8000 RFC 6455 4.2.1.4 case sensitivity fix · chrisella/arduinoWebSockets@c4e5f5c · GitHub
[go: up one dir, main page]

Skip to content

Commit c4e5f5c

Browse files
committed
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."
1 parent 6972f7a commit c4e5f5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebSocketsServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ 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.indexOf("Upgrade") >= 0) {
593+
if(headerValue.equalsIgnoreCase("Upgrade")) {
594594
client->cIsUpgrade = true;
595595
}
596596
} else if(headerName.equalsIgnoreCase("Upgrade")) {

0 commit comments

Comments
 (0)
0