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 index 1855e3c..8cb0685 100644 --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -1439,6 +1439,10 @@ part->start = part_start; part->end = u->buffer.last; + if (u->buffer.pos < u->buffer.last) { + continue; + } + return NGX_AGAIN; } }