[Modify] Polish it

This commit is contained in:
sta 2017-11-27 14:33:46 +09:00
parent a31fc09cf0
commit 8e6040983f

View File

@ -961,7 +961,7 @@ namespace WebSocketSharp
}
var protocol = headers["Sec-WebSocket-Protocol"];
if (!validateSecWebSocketProtocolClientHeader (protocol)) {
if (protocol != null && protocol.Length == 0) {
message = "It includes an invalid Sec-WebSocket-Protocol header.";
return false;
}