Forum: NGINX ssi, reverse-proxy and compression

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Olivier B. (Guest)
on 2009-01-28 14:17
(Received via mailing list)
Hello,

we're using ssi with reverse-proxy on NginX 0.6.34, but have a problem
when contents is compressed on the fly by the backend.
As we can't disable this on the backend, we would like setup NginX to
don't send the "Accept-Encoding" header to it, or to decompress this
contents before processing ssi tags.

I don't find how to set up that, so actually I simply replace the
Accept-Encoding this way :
    proxy_set_header Accept-Encoding none

Is there a "better" way to do that ?

Thanks in advance,
Olivier
Igor S. (Guest)
on 2009-01-28 14:21
(Received via mailing list)
On Wed, Jan 28, 2009 at 01:07:52PM +0100, Olivier B. wrote:

>    proxy_set_header Accept-Encoding none
>
> Is there a "better" way to do that ?

    proxy_set_header Accept-Encoding "";
Olivier B.valet (Guest)
on 2009-01-28 14:37
(Received via mailing list)
Perfect ;) Thanks !

Olivier

Igor S. a écrit :
Arvind Jayaprakash (Guest)
on 2009-01-28 15:15
(Received via mailing list)
On Jan 28, Olivier B. wrote:
>    proxy_set_header Accept-Encoding none
>
> Is there a "better" way to do that ?

HTTP compression requires HTTP 1.1 and from what I know, nginx uses HTTP
1.0 for proxying. In that case, there should be no compression in a HTTP
1.0 response. So it sounds like the backend is sending compressed
response when it should not do so.

http://tools.ietf.org/html/rfc2616#section-14.3
Igor S. (Guest)
on 2009-01-28 15:45
(Received via mailing list)
On Wed, Jan 28, 2009 at 06:35:39PM +0530, Arvind Jayaprakash wrote:

> > Accept-Encoding this way :
> >    proxy_set_header Accept-Encoding none
> >
> > Is there a "better" way to do that ?
>
> HTTP compression requires HTTP 1.1 and from what I know, nginx uses HTTP
> 1.0 for proxying. In that case, there should be no compression in a HTTP
> 1.0 response. So it sounds like the backend is sending compressed
> response when it should not do so.
>
> http://tools.ietf.org/html/rfc2616#section-14.3

Actually, HTTP/1.0 clients usually understand compression.
This topic is locked and can not be replied to.