[Modify] Polish it
This commit is contained in:
parent
c015c3bd37
commit
83f7f4ec8a
@ -754,7 +754,7 @@ namespace WebSocketSharp
|
||||
}
|
||||
|
||||
if (!validateSecWebSocketProtocolHeader (headers["Sec-WebSocket-Protocol"])) {
|
||||
message = "Includes an invalid Sec-WebSocket-Protocol header.";
|
||||
message = "Includes no Sec-WebSocket-Protocol header, or it has an invalid value.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1723,7 +1723,10 @@ namespace WebSocketSharp
|
||||
if (value == null)
|
||||
return _protocols == null;
|
||||
|
||||
if (_protocols == null || !_protocols.Contains (protocol => protocol == value))
|
||||
if (value.Length == 0)
|
||||
return false;
|
||||
|
||||
if (_protocols == null || !_protocols.Contains (p => p == value))
|
||||
return false;
|
||||
|
||||
_protocol = value;
|
||||
|
Loading…
Reference in New Issue
Block a user