[Modify] Move it
This commit is contained in:
parent
eaaba53442
commit
633d80904b
@ -677,6 +677,8 @@ namespace WebSocketSharp
|
|||||||
throw new WebSocketException (CloseStatusCode.PolicyViolation, msg);
|
throw new WebSocketException (CloseStatusCode.PolicyViolation, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_base64Key = _context.Headers["Sec-WebSocket-Key"];
|
||||||
|
|
||||||
if (_protocol != null)
|
if (_protocol != null)
|
||||||
processSecWebSocketProtocolHeader (_context.SecWebSocketProtocols);
|
processSecWebSocketProtocolHeader (_context.SecWebSocketProtocols);
|
||||||
|
|
||||||
@ -1712,11 +1714,7 @@ namespace WebSocketSharp
|
|||||||
// As server
|
// As server
|
||||||
private bool validateSecWebSocketKeyHeader (string value)
|
private bool validateSecWebSocketKeyHeader (string value)
|
||||||
{
|
{
|
||||||
if (value == null || value.Length == 0)
|
return value != null && value.Length > 0;
|
||||||
return false;
|
|
||||||
|
|
||||||
_base64Key = value;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// As client
|
// As client
|
||||||
|
Loading…
Reference in New Issue
Block a user