From 8b34f07bb000a16b60b119ee24f5c0b4a5f7f937 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 22 Jul 2021 14:28:55 +0200 Subject: 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 --- extensions/http/01_http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extensions/http') 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'", ); -- cgit v1.2.3