{"_id":"@achingbrain/http-parser-js","_rev":"2-1c261d592fe14b3f0ac7f883bb5780ab","name":"@achingbrain/http-parser-js","dist-tags":{"latest":"0.5.9"},"versions":{"0.5.8":{"name":"@achingbrain/http-parser-js","version":"0.5.8","keywords":["http"],"author":{"url":"https://github.com/creationix","name":"Tim Caswell"},"license":"MIT","_id":"@achingbrain/http-parser-js@0.5.8","maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"contributors":[{"url":"https://github.com/Jimbly","name":"Jimb Esser"},{"url":"https://github.com/lrowe","name":"Lawrence Rowe"},{"url":"https://github.com/jscissr","name":"Jan Schär"},{"url":"https://github.com/paulrutter","name":"Paul Rütter"}],"homepage":"https://github.com/creationix/http-parser-js#readme","bugs":{"url":"https://github.com/creationix/http-parser-js/issues"},"dist":{"shasum":"b3e3e1b01f11072cf7fb280202fb1127a025a24d","tarball":"https://registry.npmjs.org/@achingbrain/http-parser-js/-/http-parser-js-0.5.8.tgz","fileCount":5,"integrity":"sha512-7P8ukzL4jyh8Fho5tSfPBTzWJUZ0D7DxaW7ObObT5HTcljhjq9NN/qFg1yzPxq0VWRI/8qPnSUa1ofzzH/R9eQ==","signatures":[{"sig":"MEUCIBPehft8lTv0DrccIp3MvSEm55w9IZN1mi5xGdff57GDAiEA6T5oJN5pOqtArmvD3j3bUcpvhHUzAURSYUt95hoNxvU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26711},"main":"http-parser.js","type":"module","types":"http-parser.d.ts","exports":{".":{"types":"./http-parser.d.ts","import":"./http-parser.js"}},"gitHead":"40fd5057d1675f50b6ba6183d4ce750cc54aacc6","scripts":{"test":"python2 tests/test.py && node tests/iojs/test-http-parser-durability.js","testv12":"python2 tests/test.py --node-args=\"--http-parser=legacy\" && node --http-parser=legacy tests/iojs/test-http-parser-durability.js"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"repository":{"url":"git://github.com/creationix/http-parser-js.git","type":"git"},"_npmVersion":"10.9.2","description":"A pure JS HTTP parser","directories":{},"_nodeVersion":"23.6.0","dependencies":{"uint8arrays":"^5.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/http-parser-js_0.5.8_1742972258390_0.530117449087919","host":"s3://npm-registry-packages-npm-production"}},"0.5.9":{"name":"@achingbrain/http-parser-js","version":"0.5.9","description":"A pure JS HTTP parser","main":"http-parser.js","types":"http-parser.d.ts","type":"module","exports":{".":{"types":"./http-parser.d.ts","import":"./http-parser.js"}},"scripts":{"test":"python2 tests/test.py && node tests/iojs/test-http-parser-durability.js","testv12":"python2 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","dependencies":{"uint8arrays":"^5.1.0"},"_id":"@achingbrain/http-parser-js@0.5.9","gitHead":"fe96f417366895b545c7eb253f7620dd24fcff64","bugs":{"url":"https://github.com/creationix/http-parser-js/issues"},"homepage":"https://github.com/creationix/http-parser-js#readme","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-nPuMf2zVzBAGRigH/1jFpb/6HmJsps+15f4BPlGDp3vsjYB2ZgruAErUpKpcFiVRz3DHLXcGNmuwmqZx/sVI7A==","shasum":"708aab4a46f7369f9f33d2a836fb37f5027f0038","tarball":"https://registry.npmjs.org/@achingbrain/http-parser-js/-/http-parser-js-0.5.9.tgz","fileCount":5,"unpackedSize":26841,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICtMe9+YTef68Gf4E5D2Np0VZett75GavAlyFZ3PT7lMAiEAjiEJ9u9eeVYW2yjtdPOQ3CZ7BfE/6AQgARKLyOfKSOQ="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/http-parser-js_0.5.9_1744216390576_0.7952659382689835"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-26T06:57:38.318Z","modified":"2025-04-09T16:33:10.959Z","0.5.8":"2025-03-26T06:57:38.648Z","0.5.9":"2025-04-09T16:33:10.786Z"},"bugs":{"url":"https://github.com/creationix/http-parser-js/issues"},"author":{"name":"Tim Caswell","url":"https://github.com/creationix"},"license":"MIT","homepage":"https://github.com/creationix/http-parser-js#readme","keywords":["http"],"repository":{"type":"git","url":"git://github.com/creationix/http-parser-js.git"},"description":"A pure JS HTTP parser","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"}],"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"readme":"> This is a fork of `http-parser-js` without the dependency on `node:buffer` and converted to ESM\n\n![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","readmeFilename":"README.md"}