aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_parse.c')
-rw-r--r--src/http/ngx_http_parse.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index 15bdb6189..19d599b82 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -405,12 +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;
- }
+ /* IIS can send duplicate "HTTP/1.1 ..." lines */
+ if (ch == '/'
+ && r->proxy
+ && p - r->header_start == 5
+ && ngx_strncmp(r->header_start, "HTTP", 4) == 0)
+ {
+ state = sw_ignore_line;
+ break;
}
return NGX_HTTP_PARSE_INVALID_HEADER;