diff --git a/Protocols/Websocket.php b/Protocols/Websocket.php index 0f94de61..743e962b 100644 --- a/Protocols/Websocket.php +++ b/Protocols/Websocket.php @@ -420,8 +420,7 @@ public static function dealHandshake($buffer, $connection) if (\preg_match("/Sec-WebSocket-Key: *(.*?)\r\n/i", $buffer, $match)) { $Sec_WebSocket_Key = $match[1]; } else { - $connection->close("HTTP/1.1 200 WebSocket\r\nServer: workerman/" . Worker::VERSION . "\r\n\r\n

WebSocket


workerman/" . Worker::VERSION . "
", - true); + $connection->close("HTTP/1.0 400 Bad Request\r\nServer: workerman\r\n\r\n

WebSocket


workerman
", true); return 0; } // Calculation websocket key. @@ -501,8 +500,7 @@ public static function dealHandshake($buffer, $connection) return 0; } // Bad websocket handshake request. - $connection->close("HTTP/1.1 200 WebSocket\r\nServer: workerman/" . Worker::VERSION . "\r\n\r\n

WebSocket


workerman/" . Worker::VERSION . "
", - true); + $connection->close("HTTP/1.0 400 Bad Request\r\nServer: workerman\r\n\r\n

400 Bad Request


workerman
", true); return 0; }