Skip to content

http: remove 'data' and 'end' listener if client parser error - #40244

Closed
mcollina wants to merge 1 commit into
nodejs:masterfrom
mcollina:remove-data-listener-on-error-http
Closed

http: remove 'data' and 'end' listener if client parser error#40244
mcollina wants to merge 1 commit into
nodejs:masterfrom
mcollina:remove-data-listener-on-error-http

Conversation

@mcollina

Copy link
Copy Markdown
Member

There might be the case of some more data coming through after
the parser has returned an error and we have destroyed the socket.
We should also be removing the 'data' event handler.

Fixes: #40242

There might be the case of some more data coming through after
the parser has returned an error and we have destroyed the socket.
We should also be removing the 'data' event handler.
Fixes: nodejs#40242
@nodejs-github-botnodejs-github-bot added http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run. labels Sep 28, 2021
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mcollina

Copy link
Copy Markdown
MemberAuthor

cc @terreng

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mcollinamcollina added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 29, 2021
@mcollinamcollina added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 30, 2021
@github-actionsgithub-actionsBot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 30, 2021
@github-actions

Copy link
Copy Markdown
Contributor

Landed in 4f3eda6...140b25a

nodejs-github-bot pushed a commit that referenced this pull request Sep 30, 2021
There might be the case of some more data coming through after
the parser has returned an error and we have destroyed the socket.
We should also be removing the 'data' event handler.
Fixes: #40242
PR-URL: #40244
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Oct 4, 2021
There might be the case of some more data coming through after
the parser has returned an error and we have destroyed the socket.
We should also be removing the 'data' event handler.
Fixes: #40242
PR-URL: #40244
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.httpIssues or PRs related to the http subsystem.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http: double error emitted after HPE_INVALID_CONSTANT

4 participants

@mcollina@nodejs-github-bot@jasnell@ronag