Skip to content

Commit 5c647ae

Browse files
fix: Make sure to always resume pending body collections
1 parent a0b09d6 commit 5c647ae

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

index.bs

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6589,9 +6589,22 @@ To <dfn>maybe collect network response body</dfn> given |sessions|, |request| an
65896589

65906590
Note: For redirects, only the final response body is stored.
65916591

6592+
1. Let |collected data| be [=get collected data=] with |request|'s [=request id=] and "response".
6593+
6594+
1. If |collected data| is null, return.
6595+
6596+
NOTE: This might happen if there are no collectors setup when the response is created,
6597+
and [=clone network response body=] does not clone the corresponding body.
6598+
6599+
1. Set |collected data|'s <code>pending</code> to false.
6600+
65926601
1. Let |navigable| be [=get navigable for request=] with |request|.
65936602

6594-
1. If |navigable| is null, return.
6603+
1. If |navigable| is null:
6604+
6605+
1. [=Resume=] with "<code>network data collected</code>" and (|request|'s [=request id=], "response").
6606+
6607+
1. Return.
65956608

65966609
ISSUE: This prevents collecting data not related to a navigable.
65976610
We still need to retrieve the navigable to check against the collector
@@ -6609,14 +6622,11 @@ To <dfn>maybe collect network response body</dfn> given |sessions|, |request| an
66096622

66106623
1. [=list/Append=] |collector| to |collectors|.
66116624

6612-
1. If |collectors| is [=list/empty=], return.
6625+
1. If |collectors| is [=list/empty=]:
66136626

6614-
1. Let |collected data| be [=get collected data=] with |request|'s [=request id=] and "response".
6627+
1. [=Resume=] with "<code>network data collected</code>" and (|request|'s [=request id=], "response").
66156628

6616-
1. If |collected data| is null, return.
6617-
6618-
NOTE: This might happen if there are no collectors setup when the response is created,
6619-
and [=clone network response body=] does not clone the corresponding body.
6629+
1. Return.
66206630

66216631
1. Let |bytes| be null.
66226632

@@ -6656,8 +6666,6 @@ To <dfn>maybe collect network response body</dfn> given |sessions|, |request| an
66566666

66576667
1. Set |collected data|'s <code>size</code> to |size|.
66586668

6659-
1. Set |collected data|'s <code>pending</code> to false.
6660-
66616669
1. [=Resume=] with "<code>network data collected</code>" and (|request|'s [=request id=], "response").
66626670

66636671
</div>

0 commit comments

Comments
 (0)