Skip to content

fix: preserve .. path segments in node requests - #1851

Open
Hashim1999164 wants to merge 2 commits into
forwardemail:masterfrom
Hashim1999164:fix/preserve-dotdot-in-path
Open

fix: preserve .. path segments in node requests#1851
Hashim1999164 wants to merge 2 commits into
forwardemail:masterfrom
Hashim1999164:fix/preserve-dotdot-in-path

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • Use legacy url.parse for the HTTP request path so segments like .. are not collapsed by WHATWG URL pathname normalization.
  • Keep WHATWG pathname behavior for unix socket URLs.
  • Add a regression test that hits a raw HTTP server.

Fixes #1816

Test plan

  • npm run build:lib
  • npx mocha test/node/basic.js -g "preserve .. path segments"

Use legacy url.parse for the request path so segments like ".." are
not collapsed by WHATWG URL pathname normalization. Unix socket URLs
keep the existing pathname behavior.

Fixes forwardemail#1816
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] .. in path gets collapsed after 9.0.2

1 participant