From 7b9c478143a5199aa386331f1d4d07bfaba49cb6 Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Sun, 4 Jan 2026 17:50:18 +0100 Subject: [PATCH 1/2] Update fetch-later spec according to WPT expectations There were two missing parts: 1. The body can either be null or empty (it was missing the empty case) 2. Quota computation shouldn't include aborted or already completed requests. WPT uses `AbortController` to ensure quota is freed up. This also makes sense, since they are no longer relevant. Therefore, only consider pending deferred fetches when computing quota. --- fetch.bs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fetch.bs b/fetch.bs index e9318b425..71e5a3a94 100755 --- a/fetch.bs +++ b/fetch.bs @@ -7517,6 +7517,9 @@ stated otherwise, it is 0. deferred fetch records:
    +
  1. If deferredRecord's invoke state + is not "pending", then continue. +

  2. Let requestLength be the total request length of deferredRecord's request. @@ -9532,7 +9535,7 @@ method steps are:

  3. If request's body is not null, and request's - body length is null, then throw a {{TypeError}}. + body length is null or zero, then throw a {{TypeError}}.

    Requests whose body is a {{ReadableStream}} object cannot be deferred. From 6d1fd250bd4fe6421cac39accc6e3da204b3ce53 Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Tue, 24 Mar 2026 19:32:36 +0100 Subject: [PATCH 2/2] Revert zero check --- fetch.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch.bs b/fetch.bs index 71e5a3a94..ad2f2c7d1 100755 --- a/fetch.bs +++ b/fetch.bs @@ -9535,7 +9535,7 @@ method steps are:

  4. If request's body is not null, and request's - body length is null or zero, then throw a {{TypeError}}. + body length is null, then throw a {{TypeError}}.

    Requests whose body is a {{ReadableStream}} object cannot be deferred.