удаление заголовка в nginx 0.7.44

Igor Sysoev is at rambler-co.ru
Thu Mar 26 16:13:52 MSK 2009


On Thu, Mar 26, 2009 at 04:03:41PM +0300, Anton Yuzhaninov wrote:

> В nginx 0.7.43 для удаления заголовка работала такая конструкция:
> 
> add_header Last-Modified "";
> 
> 0.7.44 ругается на эту строчку:
> 2009/03/26 16:00:35 [emerg] 61817#0: empty parameter in 
> /usr/local/nginx/conf-server-i:420
> 
> Как теперь удалять заголовки?

Патч.


-- 
Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
Index: src/http/modules/ngx_http_headers_filter_module.c
===================================================================
--- src/http/modules/ngx_http_headers_filter_module.c	(revision 1924)
+++ src/http/modules/ngx_http_headers_filter_module.c	(working copy)
@@ -608,6 +608,11 @@
         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;


More information about the nginx-ru mailing list