[Modify] Replace it
This commit is contained in:
parent
e03538bdc8
commit
b6e61c60d7
@ -1514,11 +1514,7 @@ namespace WebSocketSharp
|
|||||||
if (protocol.Length == 0)
|
if (protocol.Length == 0)
|
||||||
throw new ArgumentException ("An empty string.", "protocol");
|
throw new ArgumentException ("An empty string.", "protocol");
|
||||||
|
|
||||||
var headers = request.Headers;
|
return request.Headers.Upgrades (protocol);
|
||||||
var comparison = StringComparison.OrdinalIgnoreCase;
|
|
||||||
|
|
||||||
return headers.Contains ("Upgrade", protocol, comparison)
|
|
||||||
&& headers.Contains ("Connection", "Upgrade", comparison);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user