Skip to content

Does terminating a fetch before headers come back reject the promise? #416

@domenic

Description

@domenic

It seems like it logically would, but I cannot find spec support for that: https://fetch.spec.whatwg.org/#concept-http-network-fetch

Wait until all the headers are transmitted or fetch is being terminated with reason reason. If fetch is being terminated, then set response’s termination reason to reason.

After that we jump to step 5 and start doing stream body stuff, which will eventually land at "If at any point fetch is terminated with reason reason, run these subsubsteps:". So I guess it would fulfill with a stream that's errored? But how would you even know what status code to use?

Similarly, what if a network error occurs during the header transmission? I can't figure that out either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions