We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b10889 commit 5f69a2eCopy full SHA for 5f69a2e
src/Executor/Server.php
@@ -149,16 +149,10 @@ private function handleClientRequests(): void
149
150
private function readClientRequest($clientSocket)
151
{
152
- $request = '';
153
- while (($chunk = @fread($clientSocket, 1024)) !== false) {
154
- $request .= $chunk;
155
- if (strpos($request, "\r\n\r\n") !== false) {
156
- break;
157
- }
158
+ $request = stream_get_contents($clientSocket);
159
160
- if ($chunk === false && !feof($clientSocket)) {
161
- throw new Exception("Socket read failed");
+ if ($request === false) {
+ throw new Exception('Socket read failed');
162
}
163
164
return $request;
0 commit comments