From eed7c23885e30b04e09ad66aa9c848888b5c99b3 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Fri, 25 Apr 2025 10:50:41 +0900 Subject: [PATCH] Improve "populate request from client" for null client cases In particular, set request's window to "no-window". Also assert that origin is always set for such null-client cases. --- fetch.bs | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/fetch.bs b/fetch.bs index adee889ba..6ee43273a 100644 --- a/fetch.bs +++ b/fetch.bs @@ -4439,15 +4439,28 @@ the response. [[!HTTP-CACHING]]

To populate request from client given a request request:

    -
  1. If request's window is "client", then: set - request's window to request's client - if request's client's - global object is a {{Window}} object; otherwise - "no-window". - -

  2. If request's origin is "client", then set - request's origin to request's client's - origin. +

  3. +

    If request's window is "client": + +

      +
    1. If request's client is non-null and request's + client's global object is a + {{Window}} object, then set request's window to + request's client's + global object. + +

    2. Otherwise, set request's window to "no-window". +

    + +
  4. +

    If request's origin is "client": + +

      +
    1. Assert: request's client is non-null. + +

    2. Set request's origin to request's + client's origin. +

  5. If request's policy container is "client":