]> git.kaiwu.me - nginx.git/commitdiff
r2194 merge:
authorIgor Sysoev <igor@sysoev.ru>
Thu, 20 Nov 2008 17:12:15 +0000 (17:12 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 20 Nov 2008 17:12:15 +0000 (17:12 +0000)
fix $r->header_in() for "User-Agent", "Connection", and "Host"
broken in r2091 and r2093 merges

src/http/ngx_http_request.c

index 5258ad91fb2fd3546fe36445732855b463c999b1..aa61c5e62c4a54e9ab6e79444e6a7487bf21b33b 100644 (file)
@@ -74,15 +74,18 @@ static char *ngx_http_client_errors[] = {
 
 
 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 },