mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
Wrong error code if Sec-WebSocket-Accept header field missed or value wrong #1120
This commit is contained in:
parent
51c65d23f8
commit
ee9b2003ba
@ -204,7 +204,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…
Reference in New Issue
Block a user