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

http: fix socketOnWrap edge cases #27968

Closed
wants to merge 2 commits into from

Conversation

apapirovski
Copy link
Member

Properly handle prependListener wrapping on http server socket, in addition to on and addListener. (A commit was made that was supposed to fix this last month but hadn't actually done so.)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Properly handle prependListener wrapping on http server
socket, in addition to on and addListener.
@nodejs-github-bot
Copy link
Collaborator

socket.addListener = socket.on;
socket.on = generateSocketListenerWrapper('on');
socket.addListener = generateSocketListenerWrapper('addListener');
socket.prependListener = generateSocketListenerWrapper('prependListener');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also add addListener and prependListener to the comment for clarify ?

@ZYSzys ZYSzys added the http Issues or PRs related to the http subsystem. label May 30, 2019
@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Jun 2, 2019

Landed in 58b1fe7

@Trott Trott closed this Jun 2, 2019
Trott pushed a commit to Trott/io.js that referenced this pull request Jun 2, 2019
Properly handle prependListener wrapping on http server
socket, in addition to on and addListener.

PR-URL: nodejs#27968
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@apapirovski apapirovski deleted the fix-socket-wrap-http branch June 2, 2019 17:20
targos pushed a commit that referenced this pull request Jun 3, 2019
Properly handle prependListener wrapping on http server
socket, in addition to on and addListener.

PR-URL: #27968
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@targos targos mentioned this pull request Jun 3, 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

Successfully merging this pull request may close these issues.

None yet

5 participants