]> git.kaiwu.me - nginx.git/commitdiff
remove "Content-Encoding: gzip" in 304 response
authorIgor Sysoev <igor@sysoev.ru>
Wed, 11 Nov 2009 14:32:49 +0000 (14:32 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 11 Nov 2009 14:32:49 +0000 (14:32 +0000)
sent by ngx_http_gzip_static_module

src/http/modules/ngx_http_not_modified_filter_module.c

index 5312b3a220b96eb259578d7a43ecd878a56914ab..7058157407dd8c342cd107812d1409b9404f615c 100644 (file)
@@ -88,6 +88,11 @@ ngx_http_not_modified_header_filter(ngx_http_request_t *r)
     ngx_http_clear_content_length(r);
     ngx_http_clear_accept_ranges(r);
 
+    if (r->headers_out.content_encoding) {
+        r->headers_out.content_encoding->hash = 0;
+        r->headers_out.content_encoding = NULL;
+    }
+
     return ngx_http_next_header_filter(r);
 }