hippie icon indicating copy to clipboard operation
hippie copied to clipboard

Fixing `HPE_INVALID_HEADER_TOKEN` complaints

Open BigBlueHat opened this issue 8 years ago • 0 comments

I just hit this with an API I'm developing (...typos... :tired_face:). 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? :tophat:

BigBlueHat avatar Jun 07 '16 19:06 BigBlueHat