[nginx] svn commit: r4747 - in trunk/src/http: . modules
mdounin at mdounin.ru
mdounin at mdounin.ru
Sat Jul 7 21:22:27 UTC 2012
Author: mdounin
Date: 2012-07-07 21:22:27 +0000 (Sat, 07 Jul 2012)
New Revision: 4747
URL: http://trac.nginx.org/nginx/changeset/4747/nginx
Log:
Entity tags: clear on entity changes.
Modified:
trunk/src/http/modules/ngx_http_addition_filter_module.c
trunk/src/http/modules/ngx_http_gzip_filter_module.c
trunk/src/http/modules/ngx_http_ssi_filter_module.c
trunk/src/http/modules/ngx_http_sub_filter_module.c
trunk/src/http/modules/ngx_http_xslt_filter_module.c
trunk/src/http/ngx_http_core_module.h
trunk/src/http/ngx_http_special_response.c
Modified: trunk/src/http/modules/ngx_http_addition_filter_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_addition_filter_module.c 2012-07-07 21:21:15 UTC (rev 4746)
+++ trunk/src/http/modules/ngx_http_addition_filter_module.c 2012-07-07 21:22:27 UTC (rev 4747)
@@ -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);
}
Modified: trunk/src/http/modules/ngx_http_gzip_filter_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_gzip_filter_module.c 2012-07-07 21:21:15 UTC (rev 4746)
+++ trunk/src/http/modules/ngx_http_gzip_filter_module.c 2012-07-07 21:22:27 UTC (rev 4747)
@@ -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);
}
Modified: trunk/src/http/modules/ngx_http_ssi_filter_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_ssi_filter_module.c 2012-07-07 21:21:15 UTC (rev 4746)
+++ trunk/src/http/modules/ngx_http_ssi_filter_module.c 2012-07-07 21:22:27 UTC (rev 4747)
@@ -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);
Modified: trunk/src/http/modules/ngx_http_sub_filter_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_sub_filter_module.c 2012-07-07 21:21:15 UTC (rev 4746)
+++ trunk/src/http/modules/ngx_http_sub_filter_module.c 2012-07-07 21:22:27 UTC (rev 4747)
@@ -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);
Modified: trunk/src/http/modules/ngx_http_xslt_filter_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_xslt_filter_module.c 2012-07-07 21:21:15 UTC (rev 4746)
+++ trunk/src/http/modules/ngx_http_xslt_filter_module.c 2012-07-07 21:22:27 UTC (rev 4747)
@@ -328,6 +328,7 @@
}
ngx_http_clear_last_modified(r);
+ ngx_http_clear_etag(r);
}
rc = ngx_http_next_header_filter(r);
Modified: trunk/src/http/ngx_http_core_module.h
===================================================================
--- trunk/src/http/ngx_http_core_module.h 2012-07-07 21:21:15 UTC (rev 4746)
+++ trunk/src/http/ngx_http_core_module.h 2012-07-07 21:22:27 UTC (rev 4747)
@@ -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_ */
Modified: trunk/src/http/ngx_http_special_response.c
===================================================================
--- trunk/src/http/ngx_http_special_response.c 2012-07-07 21:21:15 UTC (rev 4746)
+++ trunk/src/http/ngx_http_special_response.c 2012-07-07 21:22:27 UTC (rev 4747)
@@ -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);
More information about the nginx-devel
mailing list