[Modify] Replace it

This commit is contained in:
sta 2017-12-23 16:36:19 +09:00
parent 6e68eade57
commit cf359b9014

View File

@ -99,11 +99,9 @@ namespace WebSocketSharp
public bool IsWebSocketRequest { public bool IsWebSocketRequest {
get { get {
if (!_websocketRequestSet) { if (!_websocketRequestSet) {
var headers = Headers; _websocketRequest = _method == "GET"
_websocketRequest = _method == "GET" && && ProtocolVersion > HttpVersion.Version10
ProtocolVersion > HttpVersion.Version10 && && Headers.Upgrades ("websocket");
headers.Contains ("Upgrade", "websocket") &&
headers.Contains ("Connection", "Upgrade");
_websocketRequestSet = true; _websocketRequestSet = true;
} }