[Modify] Replace it
This commit is contained in:
parent
dcc56fa071
commit
eaaba53442
@ -677,11 +677,8 @@ namespace WebSocketSharp
|
|||||||
throw new WebSocketException (CloseStatusCode.PolicyViolation, msg);
|
throw new WebSocketException (CloseStatusCode.PolicyViolation, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_protocol != null
|
if (_protocol != null)
|
||||||
&& !_context.SecWebSocketProtocols.Contains (protocol => protocol == _protocol)
|
processSecWebSocketProtocolHeader (_context.SecWebSocketProtocols);
|
||||||
) {
|
|
||||||
_protocol = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_ignoreExtensions)
|
if (!_ignoreExtensions)
|
||||||
processSecWebSocketExtensionsHeader (_context.Headers["Sec-WebSocket-Extensions"]);
|
processSecWebSocketExtensionsHeader (_context.Headers["Sec-WebSocket-Extensions"]);
|
||||||
@ -1257,6 +1254,15 @@ namespace WebSocketSharp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// As server
|
||||||
|
private void processSecWebSocketProtocolHeader (IEnumerable<string> values)
|
||||||
|
{
|
||||||
|
if (values.Contains (p => p == _protocol))
|
||||||
|
return;
|
||||||
|
|
||||||
|
_protocol = null;
|
||||||
|
}
|
||||||
|
|
||||||
private bool processUnsupportedFrame (WebSocketFrame frame)
|
private bool processUnsupportedFrame (WebSocketFrame frame)
|
||||||
{
|
{
|
||||||
_logger.Fatal ("An unsupported frame:" + frame.PrintToString (false));
|
_logger.Fatal ("An unsupported frame:" + frame.PrintToString (false));
|
||||||
|
Loading…
Reference in New Issue
Block a user