Mercurial > hg > nginx
diff src/http/modules/ngx_http_headers_filter_module.c @ 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 | 837d0a1bc31c |
children | 74ffe03555d0 |
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) {