Skip to content

Commit 3cc69b8

Browse files
Bug 1687021: Allow connection header names to be case insensitive. r=remote-protocol-reviewers,whimboo
Some client bindings will send over the headers with either a capital first letter and some might not. We need to handle all cases Differential Revision: https://phabricator.services.mozilla.com/D103384
1 parent 74b40cd commit 3cc69b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

remote/server/WebSocketHandshake.jsm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ function processRequest({ requestLine, headers }) {
9393
!connection ||
9494
!connection
9595
.split(",")
96-
.map(t => t.trim())
97-
.includes("Upgrade")
96+
.map(t => t.trim().toLowerCase())
97+
.includes("upgrade")
9898
) {
9999
throw new Error("The handshake request has incorrect Connection header");
100100
}

0 commit comments

Comments
 (0)