[wpt-sync] Sync PR 15388 - SignedExchange: Close response body data pipe on integrity error

RESOLVED FIXED in Firefox 67

Status

enhancement
P4
normal
RESOLVED FIXED
6 months ago
5 months ago

People

(Reporter: wptsync, Unassigned)

Tracking

unspecified
mozilla67
Points:
---

Firefox Tracking Flags

(firefox67 fixed)

Details

(Whiteboard: [wptsync downstream], )

Sync web-platform-tests PR 15388 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/15388
Details from upstream follow.

Kunihiko Sakamoto <ksakamoto@chromium.org> wrote:

SignedExchange: Close response body data pipe on integrity error

This fixes a bug where data pipe for response body was not closed when
Signed Exchange has payload integrity error.

SourceStreamToDataPipe::OnComplete() attempts to close the pipe by
resetting |pending_write_|. But if |source_| is a FilterSourceStream, it
still retains a reference to |pending_write_|. We should explicitly call
|pending_write_->Complete(0)| to free the pipe on error cases too.

Bug: 931955
Change-Id: I63b2470dbb92aa57016c5c71222bcdabe889fd34
Reviewed-on: https://chromium-review.googlesource.com/c/1470355
Reviewed-by: Kinuko Yasuda \<kinuko@chromium.org>
Commit-Queue: Kunihiko Sakamoto \<ksakamoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632118}

Ran 2 tests and 2 subtests
OK     : 2
PASS   : 1
FAIL   : 1

New tests that have failures or other problems:
/signed-exchange/sxg-prefetch-merkle-integrity-error.tentative.html
    Prefetching SignedHTTPExchange with payload integrity error should fail: FAIL
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8b3668ee0579
[wpt PR 15388] - SignedExchange: Close response body data pipe on integrity error, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/b571112619c2
[wpt PR 15388] - Update wpt metadata, a=testonly
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1c69ba77f5c9
[wpt PR 15388] - SignedExchange: Close response body data pipe on integrity error, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/c8eeaabc6e78
[wpt PR 15388] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.