{"name":"http-parser-js","version":"0.5.10","description":"A pure JS HTTP parser for node.","main":"http-parser.js","types":"http-parser.d.ts","scripts":{"test":"python tests/test.py && node tests/iojs/test-http-parser-durability.js","testv12":"python tests/test.py --node-args=\"--http-parser=legacy\" && node --http-parser=legacy tests/iojs/test-http-parser-durability.js"},"repository":{"type":"git","url":"git://github.com/creationix/http-parser-js.git"},"keywords":["http"],"author":{"name":"Tim Caswell","url":"https://github.com/creationix"},"contributors":[{"name":"Jimb Esser","url":"https://github.com/Jimbly"},{"name":"Lawrence Rowe","url":"https://github.com/lrowe"},{"name":"Jan Schär","url":"https://github.com/jscissr"},{"name":"Paul Rütter","url":"https://github.com/paulrutter"}],"license":"MIT","_id":"http-parser-js@0.5.10","gitHead":"ed2a08c59f221e6d1d0fec664df28e8adac5e0bd","bugs":{"url":"https://github.com/creationix/http-parser-js/issues"},"homepage":"https://github.com/creationix/http-parser-js#readme","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-Pysuw9XpUq5dVc/2SMHpuTY01RFl8fttgcyunjL7eEMhGM3cI4eOmiCycJDVCo/7O7ClfQD3SaI6ftDzqOXYMA==","shasum":"b3277bd6d7ed5588e20ea73bf724fcbe44609075","tarball":"http://registry-npm.ywwl.com/http-parser-js/download/http-parser-js-0.5.10.tgz","fileCount":5,"unpackedSize":26471,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDLFt7H2Zy2IkDN1htpMhsYKWi0HvyvMhMDm4ZkBebV4gIgKS4w+CrZ84fe8ctQo2UqNinXAXr08VWEy6umSFNiuW0="}],"size":7719,"noattachment":false,"key":"/http-parser-js/-/http-parser-js-0.5.10.tgz"},"_npmUser":{"name":"jimbly","email":"wasteland@gmail.com"},"directories":{},"maintainers":[{"name":"creationix","email":"tim@creationix.com"},{"name":"jimbly","email":"wasteland@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/http-parser-js_0.5.10_1744121547488_0.517112359591551"},"_hasShrinkwrap":false,"readme":"![Node](https://github.com/creationix/http-parser-js/workflows/Node/badge.svg)\n![Node-v12](https://github.com/creationix/http-parser-js/workflows/Node-v12/badge.svg)\n\n# HTTP Parser\n\nThis library parses HTTP protocol for requests and responses.\nIt was created to replace `http_parser.c` since calling C++ functions from JS is really slow in V8.\nHowever, 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.\n\nThis is packaged as a standalone npm module.\nTo use in node, monkeypatch HTTPParser.\n\n```js\n// Monkey patch before you require http for the first time.\nprocess.binding('http_parser').HTTPParser = require('http-parser-js').HTTPParser;\n\nvar http = require('http');\n// ...\n```\n\n## Testing\n\nSimply run `npm test`.\nThe tests are copied from node and mscedex/io.js, with some modifcations.\n\n## Status\n\nThis 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.\n\n### Node versions\n\n`http-parser-js` should work via monkey-patching on Node v6-v11, and v13-14.\n\nNode 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.\n\n## Standalone usage\n\nWhile 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`](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.\n\n## License\n\nMIT.\nSee [LICENSE.md](LICENSE.md)\n","publish_time":1744121547703,"_cnpm_publish_time":1744121547703,"dist-tags":{"latest":"0.5.10"}}