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

[DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated. #84

Open
meesha81 opened this issue Sep 22, 2021 · 1 comment

Comments

@meesha81
Copy link

I would like to ask if it would be possible to adjust the use depending on the published DEP0111.

More info here:
https://nodejs.org/api/deprecations.html#DEP0111

Node currently do not want this usage:
process.binding('http_parser').HTTPParser = require('http-parser-js').HTTPParser;

@Jimbly
Copy link
Collaborator

Jimbly commented Sep 22, 2021

Nope, if you want to change how Node's internal http parsing behaves by replacing it with this module, you need to access the node internal bindings, no way around that :(.

You can maybe run node --expose-internals and use const { internalBinding } = require('internal/test/binding'); internalBinding('http_parser') instead, or something like that, as that's what's currently used in the Node.js test that helps ensure this module will keep working, but that's perhaps even more unsafe/unstable than process.binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants