mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 08:31:43 +02:00
align with 1.4.6
This commit is contained in:
@@ -47,7 +47,6 @@
|
||||
#include "Poco/SHA1Engine.h"
|
||||
#include "Poco/Base64Encoder.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/StringTokenizer.h"
|
||||
#include "Poco/Random.h"
|
||||
#include "Poco/StreamCopier.h"
|
||||
#include <sstream>
|
||||
@@ -134,8 +133,7 @@ WebSocket::Mode WebSocket::mode() const
|
||||
|
||||
WebSocketImpl* WebSocket::accept(HTTPServerRequest& request, HTTPServerResponse& response)
|
||||
{
|
||||
StringTokenizer st(request.get("Connection", ""), ",", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
|
||||
if (st.has("Upgrade") && icompare(request.get("Upgrade", ""), "websocket") == 0)
|
||||
if (request.hasToken("Connection", "upgrade") && icompare(request.get("Upgrade", ""), "websocket") == 0)
|
||||
{
|
||||
std::string version = request.get("Sec-WebSocket-Version", "");
|
||||
if (version.empty()) throw WebSocketException("Missing Sec-WebSocket-Version in handshake request", WS_ERR_HANDSHAKE_NO_VERSION);
|
||||
|
Reference in New Issue
Block a user