-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Labels
known limitationIssues that are identified as known limitations.Issues that are identified as known limitations.urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.
Description
- Version: >=10.20.1
- Platform: all
- Subsystem: http
What steps will reproduce the bug?
const http = require('http');
const url = new URL('http://httpbin.org/anything?a=~');
url.search = url.searchParams.toString(); // trigger normalization
const request = http.get(url, response => {
const chunks = [];
response.on('data', chunk => {
chunks.push(chunk);
});
response.once('end', () => {
console.log(request._header);
// Actual:
// GET /anything?a=%7E
//
// Expected:
// GET /anything?a=~
});
})How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
GET /anything?a=~
What do you see instead?
GET /anything?a=%7E
Additional information
According to tools.ietf.org/html/rfc3986#section-2.3 tilde is unreserved and should not encoded by URI producers.
Metadata
Metadata
Assignees
Labels
known limitationIssues that are identified as known limitations.Issues that are identified as known limitations.urlIssues and PRs related to the legacy built-in url module.Issues and PRs related to the legacy built-in url module.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.