mirror of
https://github.com/nginx/nginx.git
synced 2026-08-04 14:58:20 +00:00
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.
This commit is contained in:
parent
0ca52adff6
commit
6291a29992
1 changed files with 4 additions and 0 deletions
|
|
@ -339,6 +339,10 @@ ngx_http_add_cache_control(ngx_http_request_t *r, ngx_http_header_val_t *hv,
|
|||
{
|
||||
ngx_table_elt_t *cc, **ccp;
|
||||
|
||||
if (value->len == 0) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
ccp = r->headers_out.cache_control.elts;
|
||||
|
||||
if (ccp == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue