Patch php_fix_bug_72185.patch for FPM related Bug #72185
Patch version 2018-09-04 09:38 UTC
Return to Bug #72185 |
Download this patch
Patch Revisions:
Developer: kenny@kennynet.co.uk
--- a/main/fastcgi.c
+++ b/main/fastcgi.c
@@ -1505,7 +1505,13 @@
if (req->out_hdr) {
int len = (int)(req->out_pos - ((unsigned char*)req->out_hdr + sizeof(fcgi_header)));
- req->out_pos += fcgi_make_header(req->out_hdr, (fcgi_request_type)req->out_hdr->type, req->id, len);
+ /* If the packet is empty then remove the header (fix: php-bug #72185). */
+ if (len == 0) {
+ req->out_pos = req->out_hdr;
+ } else {
+ req->out_pos += fcgi_make_header(req->out_hdr, (fcgi_request_type)req->out_hdr->type, req->id, len);
+ }
+
req->out_hdr = NULL;
}
}
|