]> git.kaiwu.me - nginx.git/commitdiff
continue to parse available fastcgi record after a split header,
authorIgor Sysoev <igor@sysoev.ru>
Tue, 4 Aug 2009 11:51:10 +0000 (11:51 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 4 Aug 2009 11:51:10 +0000 (11:51 +0000)
this fixes the erroneous message "upstream prematurely closed connection
while reading response header from upstream"

src/http/modules/ngx_http_fastcgi_module.c

index 1855e3ccbd43150565436585f0574ff8f6e44079..8cb0685b68bfe4c0b0f1485079a014ce8f8d1edb 100644 (file)
@@ -1439,6 +1439,10 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
         part->start = part_start;
         part->end = u->buffer.last;
 
+        if (u->buffer.pos < u->buffer.last) {
+            continue;
+        }
+
         return NGX_AGAIN;
     }
 }