diff --git a/include/server/version.h b/include/server/version.h index cc282d98..cf6cf015 100644 --- a/include/server/version.h +++ b/include/server/version.h @@ -28,7 +28,7 @@ GitHub: https://github.com/chronoxor/CppServer namespace CppServer { //! Project version -const char version[] = "1.0.4.1"; +const char version[] = "1.0.4.2"; } // namespace CppServer diff --git a/source/server/ws/ws.cpp b/source/server/ws/ws.cpp index 14f60626..46295fef 100644 --- a/source/server/ws/ws.cpp +++ b/source/server/ws/ws.cpp @@ -122,7 +122,7 @@ bool WebSocket::PerformServerUpgrade(const HTTP::HTTPRequest& request, HTTP::HTT if (CppCommon::StringUtils::CompareNoCase(key, "Connection")) { - if (!CppCommon::StringUtils::CompareNoCase(value, "Upgrade") && !CppCommon::StringUtils::CompareNoCase(value, "keep-alive, Upgrade")) + if (!CppCommon::StringUtils::CompareNoCase(value, "Upgrade") && !CppCommon::StringUtils::CompareNoCase(CppCommon::StringUtils::RemoveBlank(value), "keep-alive,Upgrade")) { error = true; response.MakeErrorResponse(400, "Invalid WebSocket handshaked request: 'Connection' header value must be 'Upgrade' or 'keep-alive, Upgrade'");