From 45b3aa22c0adbea5fbfbd572eac172a60b79a5e9 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 16 Mar 2022 09:30:43 -0400 Subject: feat(ext/fetch): Allow Response status 101 (#13969) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk --- ext/fetch/23_response.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/fetch') diff --git a/ext/fetch/23_response.js b/ext/fetch/23_response.js index 4dc56dd8f..03f8c276b 100644 --- a/ext/fetch/23_response.js +++ b/ext/fetch/23_response.js @@ -265,9 +265,9 @@ context: "Argument 2", }); - if (init.status < 200 || init.status > 599) { + if ((init.status < 200 || init.status > 599) && init.status != 101) { throw new RangeError( - `The status provided (${init.status}) is outside the range [200, 599].`, + `The status provided (${init.status}) is not equal to 101 and outside the range [200, 599].`, ); } -- cgit v1.2.3