Title: Unreserved characters are escaped when making a HTTP request · Issue #33037 · nodejs/node · GitHub
Open Graph Title: Unreserved characters are escaped when making a HTTP request · Issue #33037 · nodejs/node
X Title: Unreserved characters are escaped when making a HTTP request · Issue #33037 · nodejs/node
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 ...
Open Graph 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.searchPara...
X 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.sear...
Opengraph URL: https://github.com/nodejs/node/issues/33037
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unreserved characters are escaped when making a HTTP request","articleBody":"* **Version**: >=10.20.1\r\n* **Platform**: all\r\n* **Subsystem**: http\r\n\r\n### What steps will reproduce the bug?\r\n\r\n```js\r\nconst http = require('http');\r\n\r\nconst url = new URL('http://httpbin.org/anything?a=~');\r\nurl.search = url.searchParams.toString(); // trigger normalization\r\n\r\nconst request = http.get(url, response => {\r\n const chunks = [];\r\n\r\n response.on('data', chunk => {\r\n chunks.push(chunk);\r\n });\r\n\r\n response.once('end', () => {\r\n console.log(request._header);\r\n // Actual:\r\n // GET /anything?a=%7E\r\n //\r\n // Expected:\r\n // GET /anything?a=~\r\n });\r\n})\r\n```\r\n\r\n### How often does it reproduce? Is there a required condition?\r\n\r\nAlways.\r\n\r\n### What is the expected behavior?\r\n\r\n```\r\nGET /anything?a=~\r\n```\r\n\r\n### What do you see instead?\r\n\r\n```\r\nGET /anything?a=%7E\r\n```\r\n\r\n### Additional information\r\n\r\n> According to tools.ietf.org/html/rfc3986#section-2.3 tilde is unreserved and should not encoded by URI producers.\r\n\r\nhttps://github.com/sindresorhus/got/issues/1180#issuecomment-618831326\r\n","author":{"url":"https://github.com/szmarczak","@type":"Person","name":"szmarczak"},"datePublished":"2020-04-24T08:29:47Z","url":"https://github.com/nodejs/node/issues/33037"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4af18ef8-0572-2539-e78a-ef8b68e4d156 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B046:36D84F:67563E:89E442:6AED211C |
| html-safe-nonce | 9bbc29b53388c61601d533c059ceb3d7f8d3db7210e56ee3e7bd643afeb23dec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDQ2OjM2RDg0Rjo2NzU2M0U6ODlFNDQyOjZBRUQyMTFDIiwidmlzaXRvcl9pZCI6IjIxMzExMTY5NDI0NzMxMDk3ODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3216cabf059eb93ad4c4d9f4d2241e2550510ca3dbe5bd741db5429d72a0f206 |
| hovercard-subject-tag | issue:606138069 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/33037/issue_layout |
| twitter:image | https://opengraph.githubassets.com/04d07917922c6803e59f3bbe153db0ed18a584235afc71a03b8dc6f7608aa04b/nodejs/node/issues/33037 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/04d07917922c6803e59f3bbe153db0ed18a584235afc71a03b8dc6f7608aa04b/nodejs/node/issues/33037 |
| og:image:alt | 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.searchPara... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | szmarczak |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 707a24b346ac8a82878b9c084efaa38a997660cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width