[Modify] Replace it

This commit is contained in:
sta 2017-12-23 16:51:11 +09:00
parent a51f4da264
commit 8cdd7e4b89

View File

@ -104,11 +104,9 @@ namespace WebSocketSharp
public bool IsWebSocketResponse { public bool IsWebSocketResponse {
get { get {
var headers = Headers; return ProtocolVersion > HttpVersion.Version10
return ProtocolVersion > HttpVersion.Version10 && && _code == "101"
_code == "101" && && Headers.Upgrades ("websocket");
headers.Contains ("Upgrade", "websocket") &&
headers.Contains ("Connection", "Upgrade");
} }
} }