-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Impossible to make a HTTP request if response headers include control characters #30573
Comments
Does #30567 let in control characters? @indutny @sam-github |
I believe it would help. |
I don't particularly like It is a welcome workaround, though it is very much all or nothing. I would much rather have Node.js throw an error and give me access to the raw HTTP response. This way I could do whatever checks before proceeding to parse the response. |
if you just want the raw response, why not use |
That would break a number of things, starting with Come to think about it, if Node.js cannot parse the HTTP response, then it couldn't provide the necessary data to the |
Solved by |
Version
$ node -v v13.1.0 $ uname -a 06:58:36 Darwin Admins-MacBook-Pro.local 19.0.0 Darwin Kernel Version 19.0.0: Wed Sep 25 20:18:50 PDT 2019; root:xnu-6153.11.26~2/RELEASE_X86_64 x86_64
Code
Actual
Error:
Expected
"OK" or an error with an access to the raw HTTP response, so that I could at least somehow parse the response myself.
Workarounds
None known to me.
Previously it was possible to workaround it using
--http-parser=legacy
.This stopped working in v13.
Previous it was possible to override the default HTTP parser.
This stopped working in v12.
This issue did not exist in Node.js v10.
Related issues
The text was updated successfully, but these errors were encountered: