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_parser: move process.binding('http_parser') to internalBinding #22329

Closed
wants to merge 1 commit into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Aug 15, 2018

Refs: #22160

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

@jasnell jasnell added semver-major PRs that contain breaking changes and should be released in the next major version. http_parser Issues and PRs related to the HTTP Parser dependency or the http_parser binding. labels Aug 15, 2018
@nodejs-github-bot
Copy link
Collaborator

@jasnell sadly an error occured when I tried to trigger a build :(

@nodejs-github-bot nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Aug 15, 2018
@devsnek
Copy link
Member

devsnek commented Aug 15, 2018

one interesting thing here is that people override process.binding('http_parser').HTTPParser for certain behaviours such as custom verbs or performance boosts for their workloads. i think we should look into exposing an api (maybe on http.request and http.createServer) to set a custom parser interface.

@jasnell
Copy link
Member Author

jasnell commented Aug 15, 2018

Yep, this one is definitely going to need the fallthrough support #22269 once I get that landed and we will need to be careful about fully deprecating this one.

Copy link
Contributor

@maclover7 maclover7 left a comment

Choose a reason for hiding this comment

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

Two small nits

const hooks = initHooks();
hooks.enable();

// The hooks.enable() must come before require('interna/test/binding')
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: interna --> internal


hooks.enable();

// The hooks.enable() must come before require('interna/test/binding')
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

@jasnell jasnell force-pushed the http-parser-internal-binding branch from ccb4aba to 381cb2a Compare August 15, 2018 02:29
@jasnell jasnell requested a review from a team August 15, 2018 22:29
@jasnell
Copy link
Member Author

jasnell commented Aug 15, 2018

@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 15, 2018
@jasnell
Copy link
Member Author

jasnell commented Aug 17, 2018

ping @nodejs/tsc

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM but I prefer not to move the other functions inside of the main function. Instead, it should be possible to pass through the arguments and it's likely less churn that way.

@jasnell
Copy link
Member Author

jasnell commented Aug 18, 2018

@jasnell jasnell force-pushed the http-parser-internal-binding branch from dd2785a to 2a25ea1 Compare August 18, 2018 13:37
@jasnell
Copy link
Member Author

jasnell commented Aug 18, 2018

@jasnell
Copy link
Member Author

jasnell commented Aug 18, 2018

Unrelated failure in CI...again... https://ci.nodejs.org/job/node-test-pull-request/16543/

@jasnell
Copy link
Member Author

jasnell commented Aug 18, 2018

Finally good CI. @nodejs/tsc ... PTAL

@jasnell jasnell requested a review from a team August 18, 2018 19:43
jasnell added a commit that referenced this pull request Aug 18, 2018
Refs: #22160

PR-URL: #22329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@jasnell
Copy link
Member Author

jasnell commented Aug 18, 2018

Landed in 1744205

@jasnell jasnell closed this Aug 18, 2018
@gajus
Copy link

gajus commented Aug 8, 2019

one interesting thing here is that people override process.binding('http_parser').HTTPParser for certain behaviours such as custom verbs or performance boosts for their workloads. i think we should look into exposing an api (maybe on http.request and http.createServer) to set a custom parser interface.

Was this ever somehow addressed?

Currently facing issue in #22064 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. http_parser Issues and PRs related to the HTTP Parser dependency or the http_parser binding. lib / src Issues and PRs related to general changes in the lib or src directory. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants