From 276aac19d97c6ded0608451cef5ba4239f79dcda Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Thu, 12 Dec 2024 09:07:12 +0100 Subject: [PATCH] Correct Response's statusText check This has been wrong for a decade (see 38647562f94d396b77c62f77b4024ee21a1bb400) and nobody noticed until now. Fixes #1794. --- fetch.bs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fetch.bs b/fetch.bs index 5cbfef674..92b671004 100644 --- a/fetch.bs +++ b/fetch.bs @@ -8273,8 +8273,8 @@ enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredire
  • If init["{{ResponseInit/status}}"] is not in the range 200 to 599, inclusive, then throw a {{RangeError}}. -

  • If init["{{ResponseInit/statusText}}"] does not match the - reason-phrase token production, then throw a {{TypeError}}. +

  • If init["{{ResponseInit/statusText}}"] is not the empty string and does not match + the reason-phrase token production, then throw a {{TypeError}}.

  • Set response's response's status to init["{{ResponseInit/status}}"]. @@ -9072,14 +9072,14 @@ Alexey Proskuryakov, Andreas Kling, Andrés Gutiérrez, Andrew Sutherland, -Andrew Williams, +Andrew Williams, Ángel González, Anssi Kostiainen, Arkadiusz Michalski, Arne Johannessen, Artem Skoretskiy, Arthur Barstow, -Arthur Sonzogni, +Arthur Sonzogni, Asanka Herath, Axel Rauschmayer, Ben Kelly, @@ -9118,6 +9118,7 @@ Ehsan Akhgari, Emily Stark, Eric Lawrence, Eric Orth, +Feng Yu, François Marier, Frank Ellerman, Frederick Hirsch,