diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-04-08 15:40:10 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-04-08 15:40:10 +0000 |
commit | e2a3154f0e3020e1f21f5a88b29daf8cc26e0dc5 (patch) | |
tree | 6198fc644d2efe9d10bab8b87004a70324d6cf5d /src/http/ngx_http_parse.c | |
parent | 3f76ec190a3bd398c229deb0b4f298b9637a3129 (diff) | |
download | nginx-e2a3154f0e3020e1f21f5a88b29daf8cc26e0dc5.tar.gz nginx-e2a3154f0e3020e1f21f5a88b29daf8cc26e0dc5.zip |
nginx-0.0.1-2003-04-08-19:40:10 import
Diffstat (limited to 'src/http/ngx_http_parse.c')
-rw-r--r-- | src/http/ngx_http_parse.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index 69528690c..15bdb6189 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -338,6 +338,7 @@ int ngx_read_http_header_line(ngx_http_request_t *r, ngx_hunk_t *h) sw_space_after_value, sw_almost_done, sw_header_almost_done, + sw_ignore_line, sw_done, sw_header_done } state; @@ -404,6 +405,14 @@ int ngx_read_http_header_line(ngx_http_request_t *r, ngx_hunk_t *h) break; } + if (ch == '/') { + /* IIS can send duplicate "HTTP/1.1 ..." lines */ + if (r->proxy && ngx_strncmp(r->header_start, "HTTP", 4) == 0) { + state = sw_ignore_line; + break; + } + } + return NGX_HTTP_PARSE_INVALID_HEADER; /* space* before header value */ @@ -461,6 +470,17 @@ int ngx_read_http_header_line(ngx_http_request_t *r, ngx_hunk_t *h) } break; + /* ignore header line */ + case sw_ignore_line: + switch (ch) { + case LF: + state = sw_start; + break; + default: + break; + } + break; + /* end of header line */ case sw_almost_done: switch (ch) { |