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

http2 - compat should not emit aborted on request if has response #15339

Closed
ronag opened this issue Sep 11, 2017 · 5 comments
Closed

http2 - compat should not emit aborted on request if has response #15339

ronag opened this issue Sep 11, 2017 · 5 comments

Comments

@ronag
Copy link
Member

ronag commented Sep 11, 2017

Per discussion in, #15270.

h2 compat should not emit aborted on the request object if the stream has received a response. To make it consistent with h1 behavior.

Depending on #15270 we might want to also make h2 compat request emit a ECONNRESET on aborted. To make it consistent with h1 behavior.

I'm a little unsure about the http.ClientRequest vs http.IncomingMessage behavior. Are they the same or different? I'm basing this soley on http.ClientRequest behavior.

@apapirovski
Copy link
Member

apapirovski commented Sep 11, 2017

I'm not sure I fully follow, could you elaborate? My understanding of how this currently works:

  • client on h1 emits aborted on the req if it hasn't received a response yet or on response if it has
  • client on h2 emits aborted on the stream which is both the req & res
  • server on h2 emits aborted on the request if the request was aborted by the client
  • not sure about h1 server (quick glance at the documentation implies it's the same, would need to check the code to be sure)

@apapirovski
Copy link
Member

Re: your update, IncomingMessage behaves differently than the ClientRequest since it's responsible for the response. But also the h1 & h2 behaviours for the server are already the same afaik.

@ronag
Copy link
Member Author

ronag commented Sep 11, 2017

  • client on h1 emits aborted on the req if it hasn't received a response yet or on response if it has
  • client on h2 emits aborted on the stream which is both the req & res

This is where the inconsistency is since the compat request and response just forwards the stream aborted event. The compat request should ignore aborted if the stream has a response.

@ronag
Copy link
Member Author

ronag commented Sep 11, 2017

Sorry, I'm getting confused between incoming message and client requests.

@ronag ronag closed this as completed Sep 11, 2017
@apapirovski
Copy link
Member

No worries! I (and I'm sure everyone else) appreciate you looking at h2 in such detail. We need people using it to get it ready for prime-time.

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

2 participants