mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-18 16:37:13 +01:00
Wrong error code if Sec-WebSocket-Accept header field missed or value wrong #1120
This commit is contained in:
parent
2192416c1e
commit
0b5c50941c
@ -211,7 +211,7 @@ WebSocketImpl* WebSocket::completeHandshake(HTTPClientSession& cs, HTTPResponse&
|
||||
throw WebSocketException("No Upgrade: websocket header in handshake response", WS_ERR_NO_HANDSHAKE);
|
||||
std::string accept = response.get("Sec-WebSocket-Accept", "");
|
||||
if (accept != computeAccept(key))
|
||||
throw WebSocketException("Invalid or missing Sec-WebSocket-Accept header in handshake response", WS_ERR_NO_HANDSHAKE);
|
||||
throw WebSocketException("Invalid or missing Sec-WebSocket-Accept header in handshake response", WS_ERR_HANDSHAKE_ACCEPT);
|
||||
return new WebSocketImpl(static_cast<StreamSocketImpl*>(cs.detachSocket().impl()), true);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user