Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

HTTPParser becoming increasingly opaque #6621

@jcoglan

Description

@jcoglan

As of (I tihnk) v0.11.6, the API of process.binding('http_parser').HTTPParser has started using magic numbers instead of names for things.

One such change is replacing parser.onMessageComplete and friends with parser[3], although thankfully those magic numbers can be replaced with parser[HTTPParser.kOnMessageComplete].

The HTTP method yielded by these callbacks have also been replaced with numbers. I use this parser in websocket-driver and have had to include my own number->name map in my class that wraps HTTPParser in a stable API.

faye/websocket-driver-node@2dff35d

I don't know if this is intended to be a public API, but if so could it be kept more expressive and informative, and if not can you let me know what I should use instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions