diff src/http/ngx_http_parse.c @ 72:66de3f065886

nginx-0.0.1-2003-04-09-19:42:08 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 09 Apr 2003 15:42:08 +0000
parents 59229033ae93
children 3973260705cc
line wrap: on
line diff
--- 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_r
                 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;