Welcome! Log In Create A New Profile

Advanced

[nginx] Headers filter: empty Cache-Control is no longer added.

Maxim Dounin
October 18, 2013 10:18AM
details: http://hg.nginx.org/nginx/rev/7ed23dcfea3d
branches:
changeset: 5427:7ed23dcfea3d
user: Maxim Dounin <mdounin@mdounin.ru>
date: Fri Oct 18 18:13:44 2013 +0400
description:
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.

diffstat:

src/http/modules/ngx_http_headers_filter_module.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff --git a/src/http/modules/ngx_http_headers_filter_module.c b/src/http/modules/ngx_http_headers_filter_module.c
--- 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) {

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Headers filter: empty Cache-Control is no longer added.

Maxim Dounin 813 October 18, 2013 10:18AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 205
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready