# HG changeset patch # User Igor Sysoev # Date 1249386670 0 # Node ID 37400c84396ef0607878c7271bd0d65a4b6d871b # Parent 9848a16d05eac15150e96e888c1e22feea302b90 continue to parse available fastcgi record after a split header, this fixes the erroneous message "upstream prematurely closed connection while reading response header from upstream" diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -1439,6 +1439,10 @@ ngx_http_fastcgi_process_header(ngx_http part->start = part_start; part->end = u->buffer.last; + if (u->buffer.pos < u->buffer.last) { + continue; + } + return NGX_AGAIN; } }