mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
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
This commit is contained in:
parent
74b40cd436
commit
3cc69b8cc4
@ -93,8 +93,8 @@ function processRequest({ requestLine, headers }) {
|
||||
!connection ||
|
||||
!connection
|
||||
.split(",")
|
||||
.map(t => t.trim())
|
||||
.includes("Upgrade")
|
||||
.map(t => t.trim().toLowerCase())
|
||||
.includes("upgrade")
|
||||
) {
|
||||
throw new Error("The handshake request has incorrect Connection header");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user