]> git.kaiwu.me - nginx.git/commitdiff
fix add_header Last-Modified "", broken in r2589
authorIgor Sysoev <igor@sysoev.ru>
Thu, 26 Mar 2009 13:34:37 +0000 (13:34 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 26 Mar 2009 13:34:37 +0000 (13:34 +0000)
src/http/modules/ngx_http_headers_filter_module.c

index 071ad4782138fe9ad82b666278a85db21bdab972..13cef0bea096ba3d5639b257e8200a7c5dcdc9b4 100644 (file)
@@ -608,6 +608,11 @@ ngx_http_headers_add(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
         break;
     }
 
+    if (value[2].len == 0) {
+        ngx_memzero(&hv->value, sizeof(ngx_http_complex_value_t));
+        return NGX_CONF_OK;
+    }
+
     ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
 
     ccv.cf = cf;