- From: Yoshisato Yanagisawa <notifications@github.com>
- Date: Mon, 08 Dec 2025 23:39:43 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/ServiceWorker/pull/1811@github.com>
The "Lookup Race Response" algorithm returned a response from the race response map directly. This could lead to issues where a response body is consumed more than once, as a Response object's body cannot be reused across multiple fetch operations.
This change modifies the algorithm to return a clone of the response, aligning with the Fetch specification's standard practice for handling responses that may be used by multiple consumers. This ensures that each fetch handler receives a distinct, readable stream.
See also: https://fetch.spec.whatwg.org/#concept-response-clone
<!--
This comment and the below content is programmatically generated.
You may add a comma-separated list of anchors you'd like a
direct link to below (e.g. #idl-serializers, #idl-sequence):
Don't remove this comment or modify anything below this line.
If you don't want a preview generated for this pull request,
just replace the whole of this comment's content by "no preview"
and remove what's below.
-->
***
<a href="https://pr-preview.s3.amazonaws.com/yoshisatoyanagisawa/ServiceWorker/pull/1811.html" title="Last updated on Dec 9, 2025, 7:39 AM UTC (9a656e9)">Preview</a> | <a href="https://pr-preview.s3.amazonaws.com/w3c/ServiceWorker/1811/a6ed7c8...yoshisatoyanagisawa:9a656e9.html" title="Last updated on Dec 9, 2025, 7:39 AM UTC (9a656e9)">Diff</a>
You can view, comment on, or merge this pull request online at:
https://github.com/w3c/ServiceWorker/pull/1811
-- Commit Summary --
* Clone response in Lookup Race Response algorithm
-- File Changes --
M index.bs (2)
-- Patch Links --
https://github.com/w3c/ServiceWorker/pull/1811.patch
https://github.com/w3c/ServiceWorker/pull/1811.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1811
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/ServiceWorker/pull/1811@github.com>
Received on Tuesday, 9 December 2025 07:39:47 UTC