Skip to content

Improve ReadableStream integration with Fetch #34252

@gterzian

Description

@gterzian

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.

  1. 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

  2. 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_promise again 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-metaThis issue tracks the status of multiple, related pieces of work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions