mirror of
https://github.com/servo/servo.git
synced 2025-09-17 10:28:22 +01:00
Fix Response:bodyUsed behavior to return false if the body is null (#39287)
This PR fixes some test-cases in https://wpt.fyi/results/fetch/api/response/response-consume-empty.any.html?product=servo Fetch standard indicates `Response:bodyUsed` should return `false` if the body content is null , even if the stream was disturbed. https://fetch.spec.whatwg.org/#dom-body-bodyused > The bodyUsed getter steps are to return true if [this](https://webidl.spec.whatwg.org/#this)’s [body](https://fetch.spec.whatwg.org/#concept-body-body) is non-null and [this](https://webidl.spec.whatwg.org/#this)’s [body](https://fetch.spec.whatwg.org/#concept-body-body)’s [stream](https://fetch.spec.whatwg.org/#concept-body-stream) is [disturbed](https://streams.spec.whatwg.org/#is-readable-stream-disturbed); otherwise false. --------- Signed-off-by: araya <araya@araya.dev>
This commit is contained in:
parent
a0c3dcefe4
commit
2947476bdd
2 changed files with 15 additions and 43 deletions
|
@ -5,52 +5,10 @@
|
|||
expected: ERROR
|
||||
|
||||
[response-consume-empty.any.worker.html]
|
||||
[Consume response's body as text]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as json (error case)]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as blob]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as formData without correct type (error case)]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as arrayBuffer]
|
||||
expected: FAIL
|
||||
|
||||
[Consume empty FormData response body as text]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as formData with correct multipart type (error case)]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as formData with correct urlencoded type]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[response-consume-empty.any.html]
|
||||
[Consume response's body as text]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as json (error case)]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as blob]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as formData without correct type (error case)]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as arrayBuffer]
|
||||
expected: FAIL
|
||||
|
||||
[Consume empty FormData response body as text]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as formData with correct multipart type (error case)]
|
||||
expected: FAIL
|
||||
|
||||
[Consume response's body as formData with correct urlencoded type]
|
||||
expected: FAIL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue