Skip to content

Fixing HPE_INVALID_HEADER_TOKEN complaints #32

@BigBlueHat

Description

@BigBlueHat

I just hit this with an API I'm developing (...typos... 😫). http in node is unforgiving, so invalid headers throw HPE_INVALID_HEADER_TOKEN:

{ [Error: Parse Error] bytesParsed: 163, code: 'HPE_INVALID_HEADER_TOKEN' }

The http-parser-js library is more forgiving.

The ideal situation would be that when there is a malformed header in the response, that a test style error could be thrown--rather than an end of the world sort of thing.

Thoughts?
🎩

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions