Welcome! Log In Create A New Profile

Advanced

Re: nginx-0.7.48

April 06, 2009 04:48PM
2009/4/6 Maxim Dounin <mdounin@mdounin.ru>:
> Hello!

>> header('Content-Transfer-Encoding: binary');

This is being ignored, according to your statement below, right?

> NOTE: passing Content-Length which doesn't match actual message
> length is really bad idea.  This works now as nginx doesn't use
> persistent connections to backends, but likely break things as
> soon as persistent connections support will be introduced.  And it's
> not needed anyway (nginx will use actual file length instead).

The file length has always been right filesize() has been correct.
Unless nginx is actually calculating itself and I can ignore passing
that (?)

>> header('Content-Disposition: attachment; filename="'.basename($file_name).'"');
>> header('X-Accel-Redirect: /foo/protected/' . basename($file_name));
>>
>> Do I need to change something in this so it works (I'll upgrade to 0.7.50 also)
>
> X-Accel-Redirect takes the following headers from original
> response:
>
> Content-Type, Set-Cookie, Content-Disposition, Cache-Control,
> Expires, Accept-Ranges
>
> If you want to pass something else, you may use something like
> this:
>
>    location /foo/protected/ {
>        add_header  P3P  $upstream_http_p3p;
>        ...
>    }

well the idea was to decouple the application logic from the webserver
as much as possible :)
Subject Author Posted

nginx-0.7.48

Igor Sysoev April 06, 2009 06:20AM

Re: nginx-0.7.48

mike April 06, 2009 12:40PM

Re: nginx-0.7.48

Maxim Dounin April 06, 2009 02:22PM

Re: nginx-0.7.48

mike April 06, 2009 04:48PM

Re: nginx-0.7.48

Maxim Dounin April 06, 2009 07:35PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 192
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready