aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-08-19 19:40:45 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-08-19 19:40:45 +0000
commitcbc7c6177c58fbb371fae29353d9195de21e238a (patch)
treead20a363065f4df130580bd8c7a4b578540efe03 /src/http/ngx_http_request.c
parent1a8cbb8663e22b58c543c4ae884c209a3d739e0d (diff)
downloadnginx-cbc7c6177c58fbb371fae29353d9195de21e238a.tar.gz
nginx-cbc7c6177c58fbb371fae29353d9195de21e238a.zip
fix $r->header_in() for "User-Agent", "Connection", and "Host"
broken in r2005, r2006, and r2008.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 61a41d4b2..06320470b 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -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 },