8000 socket.io improve Cookie handling · snmng/arduinoWebSockets@9470961 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9470961

Browse files
committed
socket.io improve Cookie handling
1 parent 04919f8 commit 9470961

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
@@ -705,7 +705,7 @@ void WebSocketsClient::handleHeader(WSclient_t * client, String * headerLine) {
705705
} else if(headerName.equalsIgnoreCase(WEBSOCKETS_STRING("Sec-WebSocket-Version"))) {
706706
client->cVersion = headerValue.toInt();
707707
} else if(headerName.equalsIgnoreCase(WEBSOCKETS_STRING("Set-Cookie"))) {
708-
if(headerValue.indexOf(WEBSOCKETS_STRING("HttpOnly")) > -1) {
708+
if(headerValue.indexOf(';') > -1) {
709709
client->cSessionId = headerValue.substring(headerValue.indexOf('=') + 1, headerValue.indexOf(";"));
710710
} else {
711711
client->cSessionId = headerValue.substring(headerValue.indexOf('=') + 1);

0 commit comments

Comments
 (0)
0