8000 Firefox fix · robokoding/arduinoWebSockets@48ee5fc · GitHub
[go: up one dir, main page]

Skip to content

Commit 48ee5fc

Browse files
committed
Firefox fix
Overlay fix for Firefox and other clients that send additional data in the Connection header e.g. "Connection: Keep-Alive, Upgrade"
1 parent b168596 commit 48ee5fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/WebSocketsServer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,8 @@ void WebSocketsServer::handleHeader(WSclient_t * client, String * headerLine) {
590590
String headerValue = headerLine->substring(headerLine->indexOf(':') + 2);
591591

592592
if(headerName.equalsIgnoreCase("Connection")) {
593-
if(headerValue.equalsIgnoreCase("Upgrade")) {
593+
headerValue.toLowerCase();
594+
if(headerValue.indexOf("upgrade") >= 0) {
594595
client->cIsUpgrade = true;
595596
}
596597
} else if(headerName.equalsIgnoreCase("Upgrade")) {

0 commit comments

Comments
 (0)
0