[Modify] Polish it
This commit is contained in:
parent
01e48359ba
commit
a71197f482
@ -48,8 +48,6 @@ namespace WebSocketSharp
|
|||||||
private CookieCollection _cookies;
|
private CookieCollection _cookies;
|
||||||
private string _method;
|
private string _method;
|
||||||
private string _uri;
|
private string _uri;
|
||||||
private bool _websocketRequest;
|
|
||||||
private bool _websocketRequestSet;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -102,15 +100,9 @@ namespace WebSocketSharp
|
|||||||
|
|
||||||
public bool IsWebSocketRequest {
|
public bool IsWebSocketRequest {
|
||||||
get {
|
get {
|
||||||
if (!_websocketRequestSet) {
|
return _method == "GET"
|
||||||
_websocketRequest = _method == "GET"
|
|
||||||
&& ProtocolVersion > HttpVersion.Version10
|
&& ProtocolVersion > HttpVersion.Version10
|
||||||
&& Headers.Upgrades ("websocket");
|
&& Headers.Upgrades ("websocket");
|
||||||
|
|
||||||
_websocketRequestSet = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _websocketRequest;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user