From ef70a9c0160f2d024973c57b690332c6e67650b8 Mon Sep 17 00:00:00 2001 From: skwad77 <64254158+skwad77@users.noreply.github.com> Date: Wed, 27 Apr 2022 17:15:49 +0200 Subject: [PATCH] don't update cSessionId on unwanted Set-Cookie --- src/WebSocketsClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WebSocketsClient.cpp b/src/WebSocketsClient.cpp index 2be6f32..4ff62f0 100644 --- a/src/WebSocketsClient.cpp +++ b/src/WebSocketsClient.cpp @@ -733,7 +733,7 @@ void WebSocketsClient::handleHeader(WSclient_t * client, String * headerLine) { client->cExtensions = headerValue; } else if(headerName.equalsIgnoreCase(WEBSOCKETS_STRING("Sec-WebSocket-Version"))) { client->cVersion = headerValue.toInt(); - } else if(headerName.equalsIgnoreCase(WEBSOCKETS_STRING("Set-Cookie"))) { + } else if(headerName.equalsIgnoreCase(WEBSOCKETS_STRING("Set-Cookie")) && headerValue.indexOf(" io=") > -1) { if(headerValue.indexOf(';') > -1) { client->cSessionId = headerValue.substring(headerValue.indexOf('=') + 1, headerValue.indexOf(";")); } else {