Skip to content

Commit c64f074

Browse files
authored
Tee request body on service worker interception
Also stop transmitting request's body in this scenario. Service worker PR: w3c/ServiceWorker#1563. Tests: web-platform-tests/wpt#27325. Fixes w3c/ServiceWorker#1560 and fixes #572.
1 parent 72be227 commit c64f074

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

fetch.bs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3804,14 +3804,18 @@ these steps:
38043804
<p>If <var>request</var>'s <a>service-workers mode</a> is "<code>all</code>", then:
38053805

38063806
<ol>
3807+
<li><p>Let <var>requestForServiceWorker</var> be a <a for=request>clone</a> of
3808+
<var>request</var>.
3809+
38073810
<li><p>Set <var>response</var> to the result of invoking <a for=/>handle fetch</a> for
3808-
<var>request</var>. [[!HTML]] [[!SW]]
3811+
<var>requestForServiceWorker</var>. [[!HTML]] [[!SW]]
38093812

38103813
<li>
38113814
<p>If <var>response</var> is not null, then:
38123815

38133816
<ol>
3814-
<li><p><a>Transmit request body</a> given <var>fetchParams</var>.
3817+
<li>If <var>request</var>'s <a for=request>body</a> is non-null, then
3818+
<a for=ReadableStream>cancel</a> <var>request</var>'s <a for=request>body</a> with undefined.
38153819

38163820
<li><p>Set <var>actualResponse</var> to <var>response</var>, if <var>response</var> is not a
38173821
<a>filtered response</a>, and to <var>response</var>'s

0 commit comments

Comments
 (0)