Skip to content

Use llhttp instead of HTTPParser from _http_common #725

@kettanaito

Description

@kettanaito

The HTTP parser we're using right now is built in into Node.js but it's a part of Node's public API. Relying on it potentially dangerous as it might yield different behaviors across Node.js versions.

Instead, we can use the WASM build of llhttp, which is also the HTTP parser used by Undici:

https://github.com/nodejs/undici/blob/219da8b7b3fea7e38a7644b8bc35fe6fec97d66e/lib/dispatcher/client-h1.js#L139

I've heard that Node's HTTPParser uses llhttp under the hood so, hopefully, this refactoring isn't that difficult.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions