Skip to content

http_parser: move process.binding('http_parser') to internalBinding - #22329

Closed
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:http-parser-internal-binding
Closed

http_parser: move process.binding('http_parser') to internalBinding#22329
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:http-parser-internal-binding

Conversation

@jasnell

Copy link
Copy Markdown
Member

Refs: #22160

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

@jasnelljasnell 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
Copy Markdown
Collaborator

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

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

devsnek commented Aug 15, 2018

Copy link
Copy Markdown
Member

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
Copy Markdown
MemberAuthor

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.

@maclover7maclover7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two small nits

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: interna --> internal

Copy link
Copy Markdown
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
jasnellforce-pushed the http-parser-internal-binding branch from ccb4aba to 381cb2aCompareAugust 15, 2018 02:29
@jasnell
jasnell requested a review from a teamAugust 15, 2018 22:29
@jasnell

Copy link
Copy Markdown
MemberAuthor

@jasnelljasnell 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
Copy Markdown
MemberAuthor

ping @nodejs/tsc

@BridgeARBridgeAR left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
MemberAuthor

@jasnell
jasnellforce-pushed the http-parser-internal-binding branch from dd2785a to 2a25ea1CompareAugust 18, 2018 13:37
@jasnell

Copy link
Copy Markdown
MemberAuthor

@jasnell

Copy link
Copy Markdown
MemberAuthor

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

@jasnell

Copy link
Copy Markdown
MemberAuthor

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

@jasnell
jasnell requested a review from a teamAugust 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
Copy Markdown
MemberAuthor

Landed in 1744205

@jasnelljasnell closed this Aug 18, 2018
@gajus

gajus commented Aug 8, 2019

Copy link
Copy Markdown

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 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.http_parserIssues and PRs related to the HTTP Parser dependency or the http_parser binding.lib / srcIssues and PRs related to general changes in the lib or src directory.semver-majorPRs 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.

9 participants

@jasnell@nodejs-github-bot@devsnek@gajus@addaleax@maclover7@joyeecheung@BridgeAR@trivikr