diff --git a/Protocols/Websocket.php b/Protocols/Websocket.php
index bba8d2348..f06b5d0b3 100644
--- a/Protocols/Websocket.php
+++ b/Protocols/Websocket.php
@@ -345,8 +345,7 @@ public static function dealHandshake($buffer, TcpConnection $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\nWebSocket
workerman", true);
return 0;
}
// Calculation websocket key.
@@ -433,8 +432,7 @@ public static function dealHandshake($buffer, TcpConnection $connection)
return 0;
}
// Bad websocket handshake request.
- $connection->close("HTTP/1.1 200 WebSocket\r\nServer: workerman/".Worker::VERSION."\r\n\r\nWebSocket
workerman/".Worker::VERSION."",
- true);
+ $connection->close("HTTP/1.0 400 Bad Request\r\nServer: workerman\r\n\r\n400 Bad Request
workerman", true);
return 0;
}