Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarifying abort behaviours #74

Open
guybedford opened this issue Nov 13, 2023 · 2 comments
Open

Clarifying abort behaviours #74

guybedford opened this issue Nov 13, 2023 · 2 comments

Comments

@guybedford
Copy link
Contributor

It could be worth further clarifying the drop & abort behaviours at various stages of the lifecycle of a request and response concretely, since these are observable implementation details in HTTP.

Specifically -

  • Should the destructor for a FutureIncomingResponse that has not resolved abort the request?
  • A drop of a FutureIncomingResponse should probably also therefore also invalidate the outgoing body, so that any writes or finish calls shouldn't work.
  • Should dropping an incoming-response or incoming-body or input-stream for a response also cause the connection to be immediately aborted?

And similarly for the server handler cases as well.

@lukewagner
Copy link
Member

For the first and third bullets, you're right, we need to document these cases and I would tentatively answer "yes" to behavior you suggest.

For the second bullet, I think that questions boils down to asking: should the incoming-body returned by incoming-response.consume be documented to be a "child" of the incoming-response (where the general rule is: you have to drop all child resources before dropping the parent resources, or else you trap). We do this for other such nested cases (e.g., the input-stream returned by incoming-body.stream), so I'd expect we'd do it here, but is there a reason not to in this case @elliottt or @pchickey ?

@pavelsavara
Copy link

please consider browser/JCO and behavior of fetch & AbortController, especially with streaming request/response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants