mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 20:59:10 +00:00
fix(fetch): proxy body for requests created from other requests (#11093)
Additionally, if the existing `Request`'s body is disturbed, the Request creation should fail. This change also updates the step numbers in the Request constructor to match whatwg/fetch#1249.
This commit is contained in:
parent
2c4ce26f0b
commit
edab21ebab
5 changed files with 45 additions and 19 deletions
|
@ -4246,6 +4246,13 @@
|
|||
|
||||
webidl.configurePrototype(WritableStreamDefaultController);
|
||||
|
||||
/**
|
||||
* @param {ReadableStream} stream
|
||||
*/
|
||||
function createProxy(stream) {
|
||||
return stream.pipeThrough(new TransformStream());
|
||||
}
|
||||
|
||||
webidl.converters.ReadableStream = webidl
|
||||
.createInterfaceConverter("ReadableStream", ReadableStream);
|
||||
webidl.converters.WritableStream = webidl
|
||||
|
@ -4403,6 +4410,7 @@
|
|||
// Non-Public
|
||||
isReadableStreamDisturbed,
|
||||
errorReadableStream,
|
||||
createProxy,
|
||||
// Exposed in global runtime scope
|
||||
ByteLengthQueuingStrategy,
|
||||
CountQueuingStrategy,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue