Skip to content

Conversation

@rcanavan
Copy link

@rcanavan rcanavan commented May 2, 2024

Proposed Changes

When accidentally contacting a HTTP server instead of an fcgi server, Socket::readPacket() can turn into an infinite loop. This change implements a rudimentary check that the server that was contacted is actually a fcgi server.

Further comments

A proper fix would also implement a global timeout in Socket::readPacket(). On top of that, stream_select() or similar should be used in the while ( $length && ($buffer = fread loop so that it does not run as a busy loop, but I was unable to convince it to block with the HTTP server that caused the initial problem.

@rcanavan rcanavan requested a review from hollodotme as a code owner May 2, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant