From ee9b2003ba777174788001ffe88985c876d14673 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Thu, 14 Jan 2016 08:23:56 -0600 Subject: [PATCH] Wrong error code if Sec-WebSocket-Accept header field missed or value wrong #1120 --- Net/src/WebSocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Net/src/WebSocket.cpp b/Net/src/WebSocket.cpp index 5950a6a9d..9418dd8d4 100644 --- a/Net/src/WebSocket.cpp +++ b/Net/src/WebSocket.cpp @@ -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(cs.detachSocket().impl()), true); }