RFC 6455 4.2.1.4 case sensitivity fix

This is a case sensitivity fix for the Connection header Upgrade value to make this part meet the requirement of IETF websocket RFC 6455 4.2.1.4: "A |Connection| header field that includes the token "Upgrade", treated as an ASCII case-insensitive value."
This commit is contained in:
jlippa
2016-06-04 21:31:42 +01:00
parent 6972f7a84e
commit c4e5f5c7e7

View File

@ -590,7 +590,7 @@ void WebSocketsServer::handleHeader(WSclient_t * client, String * headerLine) {
String headerValue = headerLine->substring(headerLine->indexOf(':') + 2);
if(headerName.equalsIgnoreCase("Connection")) {
if(headerValue.indexOf("Upgrade") >= 0) {
if(headerValue.equalsIgnoreCase("Upgrade")) {
client->cIsUpgrade = true;
}
} else if(headerName.equalsIgnoreCase("Upgrade")) {