cloudflare / cloudflare/workerd
Constructing a Request with a stream must hold the original object
Open
wpt-conformance
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
See `fetch/api/request/request-init-stream.any.js`:
If you just do
```js
const body = new ReadableStream();
const request = new Request("...", { method, body, duplex });
assert_equals(request.body, body);
```
`request.body` doesn't equal `body`. I'm not quite sure what we're doing, but here's what changes:
```patch
ReadableStream {
- locked: false,
- [state]: 'readable',
+ locked: true,
+ [state]: 'closed',
[supportsBYOB]: false,
[length]: undefined
}
```
Contributor guide
Assessment
This issue has not been assessed yet.