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);
}
Subject Author Posted

Weak ETags and on-the-fly gzipping

Matthijs Langenberg June 18, 2013 10:24AM

Re: Weak ETags and on-the-fly gzipping

Matthijs Langenberg June 18, 2013 10:24AM

Re: Weak ETags and on-the-fly gzipping

neoelit May 17, 2016 10:05AM

Re: Weak ETags and on-the-fly gzipping

Maxim Dounin May 17, 2016 11:02AM

Re: Weak ETags and on-the-fly gzipping

neoelit May 18, 2016 12:41AM

Re: Weak ETags and on-the-fly gzipping

neoelit May 18, 2016 12:43AM

Re: Weak ETags and on-the-fly gzipping

Maxim Dounin June 18, 2013 10:24AM

Re: Weak ETags and on-the-fly gzipping

grosser October 18, 2013 05:12PM

Re: Weak ETags and on-the-fly gzipping

grosser October 18, 2013 05:19PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
Record Number of Users: 7 on May 23, 2016
Record Number of Guests: 238 on March 17, 2016
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready