mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
fix(ext/fetch): throw TypeError on read failure (#16219)
This commit is contained in:
parent
2c96f64fa7
commit
d47b17d37d
2 changed files with 7 additions and 19 deletions
|
@ -509,7 +509,7 @@ impl Resource for FetchResponseBodyResource {
|
||||||
// safely call `await` on it without creating a race condition.
|
// safely call `await` on it without creating a race condition.
|
||||||
Some(_) => match reader.as_mut().next().await.unwrap() {
|
Some(_) => match reader.as_mut().next().await.unwrap() {
|
||||||
Ok(chunk) => assert!(chunk.is_empty()),
|
Ok(chunk) => assert!(chunk.is_empty()),
|
||||||
Err(err) => break Err(AnyError::from(err)),
|
Err(err) => break Err(type_error(err.to_string())),
|
||||||
},
|
},
|
||||||
None => break Ok(BufView::empty()),
|
None => break Ok(BufView::empty()),
|
||||||
}
|
}
|
||||||
|
|
|
@ -2921,7 +2921,9 @@
|
||||||
"accept-header.any.worker.html": true,
|
"accept-header.any.worker.html": true,
|
||||||
"conditional-get.any.html": false,
|
"conditional-get.any.html": false,
|
||||||
"conditional-get.any.worker.html": false,
|
"conditional-get.any.worker.html": false,
|
||||||
"error-after-response.any.html": false,
|
"error-after-response.any.html": {
|
||||||
|
"ignore": true
|
||||||
|
},
|
||||||
"header-value-combining.any.html": false,
|
"header-value-combining.any.html": false,
|
||||||
"header-value-combining.any.worker.html": false,
|
"header-value-combining.any.worker.html": false,
|
||||||
"header-value-null-byte.any.html": true,
|
"header-value-null-byte.any.html": true,
|
||||||
|
@ -3218,20 +3220,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content-encoding": {
|
"content-encoding": {
|
||||||
"bad-gzip-body.any.html": [
|
"bad-gzip-body.any.html": true,
|
||||||
"Consuming the body of a resource with bad gzip content with arrayBuffer() should reject",
|
"bad-gzip-body.any.worker.html": true
|
||||||
"Consuming the body of a resource with bad gzip content with blob() should reject",
|
|
||||||
"Consuming the body of a resource with bad gzip content with formData() should reject",
|
|
||||||
"Consuming the body of a resource with bad gzip content with json() should reject",
|
|
||||||
"Consuming the body of a resource with bad gzip content with text() should reject"
|
|
||||||
],
|
|
||||||
"bad-gzip-body.any.worker.html": [
|
|
||||||
"Consuming the body of a resource with bad gzip content with arrayBuffer() should reject",
|
|
||||||
"Consuming the body of a resource with bad gzip content with blob() should reject",
|
|
||||||
"Consuming the body of a resource with bad gzip content with formData() should reject",
|
|
||||||
"Consuming the body of a resource with bad gzip content with json() should reject",
|
|
||||||
"Consuming the body of a resource with bad gzip content with text() should reject"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"content-length": {
|
"content-length": {
|
||||||
"api-and-duplicate-headers.any.html": [
|
"api-and-duplicate-headers.any.html": [
|
||||||
|
@ -3242,9 +3232,7 @@
|
||||||
"XMLHttpRequest and duplicate Content-Length/Content-Type headers",
|
"XMLHttpRequest and duplicate Content-Length/Content-Type headers",
|
||||||
"fetch() and duplicate Content-Length/Content-Type headers"
|
"fetch() and duplicate Content-Length/Content-Type headers"
|
||||||
],
|
],
|
||||||
"too-long.window.html": [
|
"too-long.window.html": true
|
||||||
"Content-Length header value of network response exceeds response body"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"content-type": {
|
"content-type": {
|
||||||
"multipart.window.html": true
|
"multipart.window.html": true
|
||||||
|
|
Loading…
Add table
Reference in a new issue