Default value of gzip_proxied

Maxim Dounin mdounin at mdounin.ru
Tue Mar 24 19:31:38 UTC 2015


Hello!

On Tue, Mar 24, 2015 at 07:11:17PM +0100, B.R. wrote:

> Hi Maxim,
> 
> There is still something I do not get...
> 
> The gzip_proxied
> <http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_proxied>
> default value is set to honor the HTTP/1.0 protocol (which does not have
> the Vary header and thus is unable to cache different versions of a
> document) in some proxies.

You are still misunderstanding things.  It's one of the two 
possible approaches to handle things even if we forget about 
HTTP/1.0 completely.

> However, the gzip_http_version
> <http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_http_version>
> default value is set so that only HTTP/1.1 requests are being compressed...
> Thus with the default setting it is impossible to compress requests
> advertising HTTP/1.0.
> 
> The RFC
> <http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-14#section-2.5>
> dictates:
> 
>    Intermediaries that process HTTP messages (i.e., all intermediaries
>    other than those acting as a tunnel) MUST send their own HTTP-Version
>    in forwarded messages.  In other words, they MUST NOT blindly forward
>    the first line of an HTTP message without ensuring that the protocol
>    version matches what the intermediary understands, and is at least
>    conditionally compliant to, for both the receiving and sending of
>    messages.

As you can see from the paragraph you quoted, nginx only knows 
HTTP version of the intermediary it got the request from.  That 
is, there is no guarantee that there are no HTTP/1.0 proxies along 
the request/response chain.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list