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 request can emit 'error' #20673

Closed
ronag opened this issue May 11, 2018 · 8 comments
Closed

http2 compat request can emit 'error' #20673

ronag opened this issue May 11, 2018 · 8 comments
Labels
http2 Issues or PRs related to the http2 subsystem.

Comments

@ronag
Copy link
Member

ronag commented May 11, 2018

http/2 compat request object can emit 'error' while http/1 request never emits errors. This can cause problems with servers crashing due with uncaught exception in code that assumes the http/1 behavior.

@mscdex
Copy link
Contributor

mscdex commented May 11, 2018

http.ClientRequest instances can emit errors, unless you mean http.IncomingMessage ?

@ronag
Copy link
Member Author

ronag commented May 11, 2018

I meant http.IncomingMessage

@ronag
Copy link
Member Author

ronag commented Oct 25, 2018

@mscdex ping?

@jasnell
Copy link
Member

jasnell commented Oct 25, 2018

@ronag ... do you have a test case to reproduce?

Sorry this fell through the cracks because I was watching labels and this one didn't end up getting labeled for some reason...

/cc @nodejs/http2

@jasnell jasnell added the http2 Issues or PRs related to the http2 subsystem. label Oct 25, 2018
@ronag
Copy link
Member Author

ronag commented Oct 25, 2018

@jasnell: Http2ServerRequest has an emit('error', ... line

@jasnell
Copy link
Member

jasnell commented Oct 25, 2018

That particular emit('error', ...) is largely defensively coded and should not ever actually happen. Do you have a test case that demonstrates that it is a problem in practice?

@ronag
Copy link
Member Author

ronag commented Oct 25, 2018

Do you have a test case that demonstrates that it is a problem in practice?

No

That particular emit('error', ...) is largely defensively coded and should not ever actually happen.

Shouldn't it be an assertion in that case?

Trott added a commit to Trott/io.js that referenced this issue Nov 16, 2018
"That particular `emit('error', ...)` is largely defensively coded and
should not ever actually happen." Sounds like an assertion rather than
an error event. The code in question has no test coverage because it is
believed to be unreachable.

Fixes: nodejs#20673
@Trott
Copy link
Member

Trott commented Nov 17, 2018

#24407

@Trott Trott closed this as completed in 566a694 Nov 20, 2018
targos pushed a commit that referenced this issue Nov 21, 2018
"That particular `emit('error', ...)` is largely defensively coded and
should not ever actually happen." Sounds like an assertion rather than
an error event. The code in question has no test coverage because it is
believed to be unreachable.

Fixes: #20673

PR-URL: #24407
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
rvagg pushed a commit that referenced this issue Nov 28, 2018
"That particular `emit('error', ...)` is largely defensively coded and
should not ever actually happen." Sounds like an assertion rather than
an error event. The code in question has no test coverage because it is
believed to be unreachable.

Fixes: #20673

PR-URL: #24407
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
codebytere pushed a commit that referenced this issue Jan 13, 2019
"That particular `emit('error', ...)` is largely defensively coded and
should not ever actually happen." Sounds like an assertion rather than
an error event. The code in question has no test coverage because it is
believed to be unreachable.

Fixes: #20673

PR-URL: #24407
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
refack pushed a commit to refack/node that referenced this issue Jan 14, 2019
"That particular `emit('error', ...)` is largely defensively coded and
should not ever actually happen." Sounds like an assertion rather than
an error event. The code in question has no test coverage because it is
believed to be unreachable.

Fixes: nodejs#20673

PR-URL: nodejs#24407
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
codebytere pushed a commit that referenced this issue Jan 29, 2019
"That particular `emit('error', ...)` is largely defensively coded and
should not ever actually happen." Sounds like an assertion rather than
an error event. The code in question has no test coverage because it is
believed to be unreachable.

Fixes: #20673

PR-URL: #24407
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants