From 48ee5fc6fbdd43bb9c425ef54df3085b36c7b1c5 Mon Sep 17 00:00:00 2001 From: jlippa Date: Sun, 5 Jun 2016 08:27:39 +0100 Subject: [PATCH] Firefox fix Overlay fix for Firefox and other clients that send additional data in the Connection header e.g. "Connection: Keep-Alive, Upgrade" --- src/WebSocketsServer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/WebSocketsServer.cpp b/src/WebSocketsServer.cpp index dbe0b34..ccde0cd 100644 --- a/src/WebSocketsServer.cpp +++ b/src/WebSocketsServer.cpp @@ -590,7 +590,8 @@ void WebSocketsServer::handleHeader(WSclient_t * client, String * headerLine) { String headerValue = headerLine->substring(headerLine->indexOf(':') + 2); if(headerName.equalsIgnoreCase("Connection")) { - if(headerValue.equalsIgnoreCase("Upgrade")) { + headerValue.toLowerCase(); + if(headerValue.indexOf("upgrade") >= 0) { client->cIsUpgrade = true; } } else if(headerName.equalsIgnoreCase("Upgrade")) {