проблема со встроенным перлом в 0.6.32

Igor Sysoev is at rambler-co.ru
Tue Aug 19 23:36:20 MSD 2008


On Tue, Aug 19, 2008 at 05:06:32PM +0400, jackal wrote:

> $r->header_in("Host") возвращает undef.
> Как лечить?
> 
> p.s. в 0.6.31 всё замечательно. Вероятно проблема из-за этого:
> >Изменение: теперь nginx разрешает несколько строк "Host" в заголовке запроса.

Патч.


-- 
Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
Index: src/http/ngx_http_request.c
===================================================================
--- src/http/ngx_http_request.c	(revision 1512)
+++ src/http/ngx_http_request.c	(working copy)
@@ -74,15 +74,18 @@
 
 
 ngx_http_header_t  ngx_http_headers_in[] = {
-    { ngx_string("Host"), 0, ngx_http_process_host },
+    { ngx_string("Host"), offsetof(ngx_http_headers_in_t, host),
+                 ngx_http_process_host },
 
-    { ngx_string("Connection"), 0, ngx_http_process_connection },
+    { ngx_string("Connection"), offsetof(ngx_http_headers_in_t, connection),
+                 ngx_http_process_connection },
 
     { ngx_string("If-Modified-Since"),
                  offsetof(ngx_http_headers_in_t, if_modified_since),
                  ngx_http_process_unique_header_line },
 
-    { ngx_string("User-Agent"), 0, ngx_http_process_user_agent },
+    { ngx_string("User-Agent"), offsetof(ngx_http_headers_in_t, user_agent),
+                 ngx_http_process_user_agent },
 
     { ngx_string("Referer"), offsetof(ngx_http_headers_in_t, referer),
                  ngx_http_process_header_line },


More information about the nginx-ru mailing list