Skip to content

Commit

Permalink
Fix #6
Browse files Browse the repository at this point in the history
  • Loading branch information
alexslipknot committed Jul 20, 2018
1 parent 02f98f4 commit b1eed92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ private function handshake($socket): Generator
$secKey = $headers['Sec-WebSocket-Key'];
$secAccept = base64_encode(pack('H*', sha1($secKey . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11')));

$response = "HTTP/1.1 101 Web Socket Protocol Handshake\n" .
"Upgrade: websocket\n" .
"Connection: Upgrade\n" .
"Sec-WebSocket-Accept:$secAccept\n\n";
$response = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" .
"Upgrade: websocket\r\n" .
"Connection: Upgrade\r\n" .
"Sec-WebSocket-Accept:$secAccept\r\n\r\n";

Logger::log('worker', $this->pid, 'handshake for ' . (int)$socket . " done.");

Expand Down

0 comments on commit b1eed92

Please sign in to comment.