Welcome! Log In Create A New Profile

Advanced

Re: Weak ETags and on-the-fly gzipping

October 18, 2013 05:19PM
There take this patch and just apply it :)


--- nginx-1.3.8/src/http/modules/ngx_http_gzip_filter_module.c
2012-07-07 17:22:27.000000000 -0400
+++ nginx-1.3.8-weak-etags-shorter/src/http/modules/ngx_http_gzip_filter_module.c2012-11-21
17:05:12.758389000 -0500
@@ -306,7 +306,15 @@

ngx_http_clear_content_length(r);
ngx_http_clear_accept_ranges(r);
- ngx_http_clear_etag(r);
+
+ /* Clear etags unless they're marked as weak (prefixed with 'W/') */
+ h = r->headers_out.etag;
+ if (h && !(h->value.len >= 3 &&
+ h->value.data[0] == 'W' &&
+ h->value.data[1] == '/' &&
+ h->value.data[2] == '"')) {
+ ngx_http_clear_etag(r);
+ }

return ngx_http_next_header_filter(r);
}
SubjectAuthorPosted

Weak ETags and on-the-fly gzipping

Matthijs LangenbergJune 18, 2013 10:24AM

Re: Weak ETags and on-the-fly gzipping

Matthijs LangenbergJune 18, 2013 10:24AM

Re: Weak ETags and on-the-fly gzipping

Maxim DouninJune 18, 2013 10:24AM

Re: Weak ETags and on-the-fly gzipping

grosserOctober 18, 2013 05:12PM

Re: Weak ETags and on-the-fly gzipping

grosserOctober 18, 2013 05:19PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 64
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready