-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Improve ReadableStream integration with Fetch #34252
Description
Follow-up on #32898 and #29088
After we have re-written our implementation so as not to rely on the deprecated one from Spidermonkey, there is still a lot of work left to improve how streams integrate with other parts of Servo, with Fetch the only example so far.
-
One part is transmitting the body of a request: https://fetch.spec.whatwg.org/#body-incrementally-read This is currently done with our Rust code calling directly into a stream via various "native" methods, this should instead happen via a reader on the stream using public methods. See
TransmitBodyConnectHandler -
The other part is consuming the body of a response: https://fetch.spec.whatwg.org/#body-fully-read We do this with
consume_body_with_promiseagain by calling "native" methods on the stream.
This was noted earlier as the "Related to how the stream is used "natively" in Rust:" part of #32898, but I think it's worth a separate issue.
We can start tracking more specific things in here.