|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-05-30 09:37 UTC] roguestar191 at comcast dot net
[2006-05-31 06:43 UTC] dmitry@php.net
[2006-05-31 11:41 UTC] roguestar191 at comcast dot net
[2006-05-31 19:10 UTC] roguestar191 at comcast dot net
[2006-06-08 11:52 UTC] dmitry@php.net
[2006-06-09 00:35 UTC] roguestar191 at comcast dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 23:00:01 2025 UTC |
Description: ------------ line 624 of sapi/cgi/fastcgi.c contains: while (recv(req->fd, buf, strlen(buf), 0) > 0) {} with buf being an array with 8 elements. With the server doesn't pad all packets to the size of 8 (Which is suggested but not required by the fast-cgi spec), this causes frequent lockups and failed requests. (Without that padding, I have no idea about with it). My fix was simple - change strlen(buf) (which returns 8), to 1, so it will read any excess bytes at the end and cleanly close and continue on, even if it's not a multiple of 8 bytes. Thank you for php! Expected result: ---------------- fast-cgi padding to be read and thrown out, requests to close. Actual result: -------------- request tends to lock up on recv when packets arn't a multiple of 8 in size.