Skip to content

Commit

Permalink
Fix Bug: .NetFramework 4.8 ClientWebSocket cann't connect WsSession
Browse files Browse the repository at this point in the history
  • Loading branch information
chronoxor committed Dec 23, 2023
1 parent 5eaaf4e commit 1e9c754
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/server/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion source/server/ws/ws.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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'");
Expand Down

0 comments on commit 1e9c754

Please sign in to comment.