[Modify] Replace it
This commit is contained in:
parent
dcc56fa071
commit
eaaba53442
@ -677,11 +677,8 @@ namespace WebSocketSharp
|
||||
throw new WebSocketException (CloseStatusCode.PolicyViolation, msg);
|
||||
}
|
||||
|
||||
if (_protocol != null
|
||||
&& !_context.SecWebSocketProtocols.Contains (protocol => protocol == _protocol)
|
||||
) {
|
||||
_protocol = null;
|
||||
}
|
||||
if (_protocol != null)
|
||||
processSecWebSocketProtocolHeader (_context.SecWebSocketProtocols);
|
||||
|
||||
if (!_ignoreExtensions)
|
||||
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)
|
||||
{
|
||||
_logger.Fatal ("An unsupported frame:" + frame.PrintToString (false));
|
||||
|
Loading…
Reference in New Issue
Block a user