-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
HTTP response corrupted with status 400 when URL includes pipe character (|
)
#27584
Comments
Thank you for reporting this bug! It’s an issue that seems to occur because we switched out the HTTP parser library default in Node 12. The good news is that you can use |
Yes, this seems like something that should be fixed in llhttp to me. At least browsers and curl do not percent-encode /cc @indutny @nodejs/http |
/me is on it |
🤦 I literally missed this single character. Thank you @hoangsetup for catching this! |
The vertical bar character `|` wasn't ported from http-parser during rewrite. This commit introduces it back. See: https://github.com/nodejs/http-parser/blob/5c17dad400e45c5a442a63f250fff2638d144682/http_parser.c#L275 See: nodejs/node#27584
See: nodejs/llhttp#24 |
The vertical bar character `|` wasn't ported from http-parser during rewrite. This commit introduces it back. See: https://github.com/nodejs/http-parser/blob/5c17dad400e45c5a442a63f250fff2638d144682/http_parser.c#L275 See: nodejs/node#27584 PR-URL: #24 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
6_64
My code:
index.js
Starting command:
node index.js
Chrome: Version 74.0.3729.131 (Official Build) (64-bit)
When I try to request to my http service, it is working fine with normal url like
http://localhost:8080/?search=example
But, when the url come to
http://localhost:8080/?search=example|
orhttp://localhost:8080/?sea|rch=example
. My browser gets back This page isn’t working andHTTP ERROR 400
(the request did not appeared on Network tab of Chrome devtool) .Try again with
curl
orPostman
, these urls are working fine 🤔=> When I use older node version like
v11.11.0
I don't get any errors.The text was updated successfully, but these errors were encountered: