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

response.finished ambiguity #28412

Closed
ronag opened this issue Jun 24, 2019 · 2 comments
Closed

response.finished ambiguity #28412

ronag opened this issue Jun 24, 2019 · 2 comments
Labels
http Issues or PRs related to the http subsystem.

Comments

@ronag
Copy link
Member

ronag commented Jun 24, 2019

Currently, there is no intuitive way to check if a response actually has "finished". The current finished property just means that the user has "finished" (i.e. called end()) not that the response itself has finished, i.e. has either emitted finish or error (or close), which is what I believe is the currently assumed behavior by many developers (even Node veterans).

However, changing this behavior now would be a rather significant breaking change. Instead, I suggest adding a closed property similar to what already exists in the http/2 API which I believe would better fulfill the expected functionality.

Thoughts?

Refs:
#28411
#24347
jshttp/on-finished#30
jshttp/on-finished#31

@ronag ronag changed the title isFinished property on http response object response.finished ambiguity Jun 24, 2019
@ronag
Copy link
Member Author

ronag commented Jun 24, 2019

Actually, currently, there is as far as I can see no way to check whether a response has completed without attaching an early event listener.

@lpinca lpinca added the http Issues or PRs related to the http subsystem. label Jul 14, 2019
@ronag
Copy link
Member Author

ronag commented Dec 28, 2019

finished is deprecated

@ronag ronag closed this as completed Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http Issues or PRs related to the http subsystem.
Projects
None yet
Development

No branches or pull requests

2 participants