Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

header could be empty string #1551

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

damiandragowski
Copy link

@damiandragowski damiandragowski commented Sep 10, 2021

changing condition, do setHeader only when header is not

null
undefined
NaN
empty string ("")
0
false

It preserve from exception:

[HPM] GET /events?uuids=18cd56cb-45cb-43e6-a397-c4531cc57866 -> http://localhost:8099
_http_outgoing.js:545
throw new ERR_INVALID_HTTP_TOKEN('Header name', name);
^

TypeError [ERR_INVALID_HTTP_TOKEN]: Header name must be a valid HTTP token [""]
at ServerResponse.setHeader (_http_outgoing.js:563:3)

changing condition, do setHeader only when header is not 

null
undefined
NaN
empty string ("")
0
false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant