changeset 5427:7ed23dcfea3d

Headers filter: empty Cache-Control is no longer added. Much like with other headers, "add_header Cache-Control $value;" no longer results in anything added to response headers if $value evaluates to an empty string.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 18 Oct 2013 18:13:44 +0400
parents 4bfa982dbf0e
children fcecb9c6a057
files src/http/modules/ngx_http_headers_filter_module.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_headers_filter_module.c
+++ b/src/http/modules/ngx_http_headers_filter_module.c
@@ -339,6 +339,10 @@ ngx_http_add_cache_control(ngx_http_requ
 {
     ngx_table_elt_t  *cc, **ccp;
 
+    if (value->len == 0) {
+        return NGX_OK;
+    }
+
     ccp = r->headers_out.cache_control.elts;
 
     if (ccp == NULL) {