Nginx patch for unexpected FASTCGI_END_REQUEST on php keep_conn + fastcgi_finish_request

Dmitry Saprykin saprykin.dmitry at gmail.com
Fri Jul 4 13:18:52 UTC 2014


Hello,

This changeset adds support for FastCGI FCGI_END_REQUEST record type.
Now nginx does not process this type of FastCGI record.
In case of usage php fastcgi upstream which finishes FastCGI
requests before end of script using fastcgi_finish_request() call
it leads to "upstream sent unexpected FastCGI record: 3 while reading
response header from upstream" error messages and 502 for clients.

Changeset parses FCGI_END_REQUEST FastCGI records and ignores it
if keep_conn is enabled and record has type FCGI_REQUEST_COMPLETE.


Kind regards,
Dmitry Saprykin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20140704/ba7df855/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FCGI_END_REQUEST.patch
Type: text/x-patch
Size: 3233 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20140704/ba7df855/attachment.bin>


More information about the nginx-devel mailing list