enabling SPDY (patch 42) +nginx 1.3.2 breaks gzip
pgnet.dev+nginx at gmail.com
Wed Jun 27 00:22:55 UTC 2012
On Tue, Jun 26, 2012 at 4:53 PM, Valentin V. Bartenev <ne at vbart.ru> wrote:
> Firefox doesn't send "Accept-Encoding" header and according to the SPDY
> specification it's not needed for using gzip compression. So, there's
> nothing wrong with Firefox.
> But, since you pass requests over HTTP and compression handled by your upstream
> servers, thus the lack of this header results in an uncompressed response.
>> Do I need to change/add something to headers in FF config as well?
> No, you don't.
> But I don't think that it's a bug. Probably, it's a feature. Firebug just
> isn't the right tool for low level debugging of browser-server communication.
I didn't realize that. I'll dig for the right tool for myself. Do
you recommend anything in particular that's helpful in tracing nginx
issues and reporting the results here?
> Since you added the "proxy_set_header" directive to "http" section, you should
> make sure that it is not overridden by the directives on other levels.
> Please note: "These directives are inherited from the previous level if and only
> if there are no proxy_set_header directives defined on the current level."
Missed that completely.
Consolidating my directives straightened out the header inheritance.
Now, I see:
Cache-Control public, max-age=300
==> Content-Encoding gzip
Content-Type text/html; charset=utf-8
Date Wed, 27 Jun 2012 00:17:07 GMT
Expires Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified Wed, 27 Jun 2012 00:16:48 GMT
Link <https://test.svr06.loc/>; rel="canonical"
==> Server nginx
Via 1.1 varnish
==> X-Firefox-Spdy 1
X-Varnish 1691959371 1691959345
which, IIUC, appears to be correct.
More information about the nginx-devel