-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
Open
Labels
httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
Description
Is your feature request related to a problem? Please describe.
Recently, I have debug a error with http header
(node:17863) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["cookie"]
at ClientRequest.setHeader (_http_outgoing.js:458:3)
at new ClientRequest (_http_client.js:221:14)
at Object.request (http.js:44:10)I take a very long time to find the invalid character (the root cause is because I put \n in the string end, so it failed).
Describe the solution you'd like
The error provide more information
Describe alternatives you've considered
Hopefully we can change something here to return more info
Lines 227 to 230 in ba565a3
| function checkInvalidHeaderChar(val) { | |
| return headerCharRegex.test(val); | |
| } | |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.