Skip to content

Commit dd8675c

Browse files
skwad77Links2004
authored andcommitted
don't update cSessionId on unwanted Set-Cookie
1 parent 2110ad0 commit dd8675c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebSocketsClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ void WebSocketsClient::handleHeader(WSclient_t * client, String * headerLine) {
733733
client->cExtensions = headerValue;
734734
} else if(headerName.equalsIgnoreCase(WEBSOCKETS_STRING("Sec-WebSocket-Version"))) {
735735
client->cVersion = headerValue.toInt();
736-
} else if(headerName.equalsIgnoreCase(WEBSOCKETS_STRING("Set-Cookie"))) {
736+
} else if(headerName.equalsIgnoreCase(WEBSOCKETS_STRING("Set-Cookie")) && headerValue.indexOf(" io=") > -1) {
737737
if(headerValue.indexOf(';') > -1) {
738738
client->cSessionId = headerValue.substring(headerValue.indexOf('=') + 1, headerValue.indexOf(";"));
739739
} else {

0 commit comments

Comments
 (0)