[Modify] Polish it
This commit is contained in:
parent
2390007ffa
commit
ec6bfb9955
@ -77,8 +77,6 @@ namespace WebSocketSharp.Net
|
|||||||
private bool _urlSet;
|
private bool _urlSet;
|
||||||
private string _userHostName;
|
private string _userHostName;
|
||||||
private string[] _userLanguages;
|
private string[] _userLanguages;
|
||||||
private bool _websocketRequest;
|
|
||||||
private bool _websocketRequestSet;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -345,15 +343,9 @@ namespace WebSocketSharp.Net
|
|||||||
/// </value>
|
/// </value>
|
||||||
public bool IsWebSocketRequest {
|
public bool IsWebSocketRequest {
|
||||||
get {
|
get {
|
||||||
if (!_websocketRequestSet) {
|
return _httpMethod == "GET"
|
||||||
_websocketRequest = _httpMethod == "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