Gathering detailed insights and metrics for http-parser-js
Gathering detailed insights and metrics for http-parser-js
Gathering detailed insights and metrics for http-parser-js
Gathering detailed insights and metrics for http-parser-js
npm install http-parser-js
Typescript
Module System
Node Version
NPM Version
JavaScript (85.1%)
Python (14.9%)
Total Downloads
3,735,356,601
Last Day
850,158
Last Week
16,820,312
Last Month
73,312,359
Last Year
774,046,748
NOASSERTION License
245 Stars
158 Commits
59 Forks
9 Watchers
9 Branches
20 Contributors
Updated on Apr 27, 2025
Minified
Minified + Gzipped
Latest Version
0.5.10
Package Id
http-parser-js@0.5.10
Unpacked Size
25.85 kB
Size
7.54 kB
File Count
5
NPM Version
10.9.0
Node Version
22.12.0
Published on
Apr 08, 2025
Cumulative downloads
Total Downloads
Last Day
-9.1%
850,158
Compared to previous day
Last Week
-9%
16,820,312
Compared to previous week
Last Month
1.9%
73,312,359
Compared to previous month
Last Year
9.9%
774,046,748
Compared to previous year
No dependencies detected.
This library parses HTTP protocol for requests and responses.
It was created to replace http_parser.c
since calling C++ functions from JS is really slow in V8.
However, it is now primarily useful in having a more flexible/tolerant HTTP parser when dealing with legacy services that do not meet the strict HTTP parsing rules Node's parser follows.
This is packaged as a standalone npm module. To use in node, monkeypatch HTTPParser.
1// Monkey patch before you require http for the first time. 2process.binding('http_parser').HTTPParser = require('http-parser-js').HTTPParser; 3 4var http = require('http'); 5// ...
Simply run npm test
.
The tests are copied from node and mscedex/io.js, with some modifcations.
This should now be usable in any node application, it now supports (nearly) everything http_parser.c
does while still being tolerant with corrupted headers, and other kinds of malformed data.
http-parser-js
should work via monkey-patching on Node v6-v11, and v13-14.
Node v12.x renamed the internal http parser, and did not expose it for monkey-patching, so to be able to monkey-patch on Node v12, you must run node --http-parser=legacy file.js
to opt in to the old, monkey-patchable http_parser binding.
While this module is intended to be used as a replacement for the internal Node.js parser, it can be used as a standalone parser. The standalone-example.js
demonstrates how to use the somewhat awkward API (coming from compatibility with the Node.js internals) to parse HTTP from raw Buffers.
MIT. See LICENSE.md
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 13/22 approved changesets -- score normalized to 5
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More