diff options
author | Luca Casonato <hello@lcas.dev> | 2021-07-22 14:28:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-22 14:28:55 +0200 |
commit | 8b34f07bb000a16b60b119ee24f5c0b4a5f7f937 (patch) | |
tree | 721fb932ddaee01059146048b8347d18ce710859 /extensions/http/01_http.js | |
parent | 4861b13aabd61d2df600e79a2e621fa1f3b870c3 (diff) |
fix(http/ws): case insensitive connection header (#11489)
The "connection" header should be case insensitive:
https://datatracker.ietf.org/doc/html/rfc7230#section-6.1
Diffstat (limited to 'extensions/http/01_http.js')
-rw-r--r-- | extensions/http/01_http.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/http/01_http.js b/extensions/http/01_http.js index 4bcdf1f07..e0f221ce0 100644 --- a/extensions/http/01_http.js +++ b/extensions/http/01_http.js @@ -321,7 +321,7 @@ ); } - if (request.headers.get("connection") !== "Upgrade") { + if (request.headers.get("connection")?.toLowerCase() !== "upgrade") { throw new TypeError( "Invalid Header: 'connection' header must be 'Upgrade'", ); |