Repository navigation
HTTP response corrupted with status 400 when URL includes pipe character (|) #27584
Copy link
Copy link
Closed
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.httpIssues and PRs related to the http subsystem.Issues and PRs related to the http subsystem.http_parserIssues and PRs related to the HTTP parser implementation or http_parser binding.Issues and PRs related to the HTTP parser implementation or http_parser binding.
Description
Activity
- addedhttpIssues and PRs related to the http subsystem.Issues and PRs related to the http subsystem.urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.
on May 6, 2019 - addedhttp_parserIssues and PRs related to the HTTP parser implementation or http_parser binding.Issues and PRs related to the HTTP parser implementation or http_parser binding.and removedurlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.
on May 6, 2019 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
--http-parser=legacyto work around this issue for now, and get consistent behaviour on both v11.x and v12.x.- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
on May 6, 2019 Yes, this seems like something that should be fixed in llhttp to me. At least browsers and curl do not percent-encode
|in the given example URLs./cc @indutny @nodejs/http
/me is on it
Reacted by Anna Henningsen, Myles Borins, Davide Allavena and Hoang Dinh Van🤦 I literally missed this single character. Thank you @hoangsetup for catching this!
- added a commit that references this issue
on May 6, 2019 See: nodejs/llhttp#24
- added a commit that references this issue
on May 7, 2019 - added a commit that references this issue
on Jul 29, 2025
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.httpIssues and PRs related to the http subsystem.Issues and PRs related to the http subsystem.http_parserIssues and PRs related to the HTTP parser implementation or http_parser binding.Issues and PRs related to the HTTP parser implementation or http_parser binding.
6_64
My code:
index.jsStarting command:
node index.jsChrome: 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=exampleBut, 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
curlorPostman, these urls are working fine 🤔=> When I use older node version like
v11.11.0I don't get any errors.