Mercurial > hg > nginx
changeset 4746:4a18bf1833a9
Entity tags: clear on entity changes.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 07 Jul 2012 21:22:27 +0000 |
parents | 4752060ca462 |
children | 1e2ac45ad25d |
files | src/http/modules/ngx_http_addition_filter_module.c src/http/modules/ngx_http_gzip_filter_module.c src/http/modules/ngx_http_ssi_filter_module.c src/http/modules/ngx_http_sub_filter_module.c src/http/modules/ngx_http_xslt_filter_module.c src/http/ngx_http_core_module.h src/http/ngx_http_special_response.c |
diffstat | 7 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_addition_filter_module.c Sat Jul 07 21:21:15 2012 +0000 +++ b/src/http/modules/ngx_http_addition_filter_module.c Sat Jul 07 21:22:27 2012 +0000 @@ -121,6 +121,7 @@ ngx_http_clear_content_length(r); ngx_http_clear_accept_ranges(r); + ngx_http_clear_etag(r); return ngx_http_next_header_filter(r); }
--- a/src/http/modules/ngx_http_gzip_filter_module.c Sat Jul 07 21:21:15 2012 +0000 +++ b/src/http/modules/ngx_http_gzip_filter_module.c Sat Jul 07 21:22:27 2012 +0000 @@ -306,6 +306,7 @@ ngx_http_clear_content_length(r); ngx_http_clear_accept_ranges(r); + ngx_http_clear_etag(r); return ngx_http_next_header_filter(r); }
--- a/src/http/modules/ngx_http_ssi_filter_module.c Sat Jul 07 21:21:15 2012 +0000 +++ b/src/http/modules/ngx_http_ssi_filter_module.c Sat Jul 07 21:22:27 2012 +0000 @@ -361,6 +361,7 @@ ngx_http_clear_content_length(r); ngx_http_clear_last_modified(r); ngx_http_clear_accept_ranges(r); + ngx_http_clear_etag(r); } return ngx_http_next_header_filter(r);
--- a/src/http/modules/ngx_http_sub_filter_module.c Sat Jul 07 21:21:15 2012 +0000 +++ b/src/http/modules/ngx_http_sub_filter_module.c Sat Jul 07 21:22:27 2012 +0000 @@ -168,6 +168,7 @@ if (r == r->main) { ngx_http_clear_content_length(r); ngx_http_clear_last_modified(r); + ngx_http_clear_etag(r); } return ngx_http_next_header_filter(r);
--- a/src/http/modules/ngx_http_xslt_filter_module.c Sat Jul 07 21:21:15 2012 +0000 +++ b/src/http/modules/ngx_http_xslt_filter_module.c Sat Jul 07 21:22:27 2012 +0000 @@ -328,6 +328,7 @@ } ngx_http_clear_last_modified(r); + ngx_http_clear_etag(r); } rc = ngx_http_next_header_filter(r);
--- a/src/http/ngx_http_core_module.h Sat Jul 07 21:21:15 2012 +0000 +++ b/src/http/ngx_http_core_module.h Sat Jul 07 21:22:27 2012 +0000 @@ -555,5 +555,12 @@ r->headers_out.location = NULL; \ } +#define ngx_http_clear_etag(r) \ + \ + if (r->headers_out.etag) { \ + r->headers_out.etag->hash = 0; \ + r->headers_out.etag = NULL; \ + } + #endif /* _NGX_HTTP_CORE_H_INCLUDED_ */
--- a/src/http/ngx_http_special_response.c Sat Jul 07 21:21:15 2012 +0000 +++ b/src/http/ngx_http_special_response.c Sat Jul 07 21:22:27 2012 +0000 @@ -656,6 +656,7 @@ ngx_http_clear_accept_ranges(r); ngx_http_clear_last_modified(r); + ngx_http_clear_etag(r); rc = ngx_http_send_header(r); @@ -754,6 +755,7 @@ ngx_http_clear_accept_ranges(r); ngx_http_clear_last_modified(r); + ngx_http_clear_etag(r); rc = ngx_http_send_header(r);