URL: dot segments (`.` and `..`) are not removed from the pathname
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 67/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust, typescript
- Domain
- networking
Research direction
Start by compiling and running the minimal reproduction in url.ts with the command shown in the issue, then trace the URL pathname parsing implementation. Check the output against the expected normalized paths /a/c and /c; the work is done when . and .. segments are removed as in the WHATWG URL parser.
Written by the indexing model from the issue text.
Description
What happened
new URL(...) keeps . and .. path segments in pathname.
What you expected
The WHATWG URL parser removes them, as Node, Deno and Bun do:
0 /a/c /c
Minimal reproduction
const i = 0;
const u = new URL("https://user:[email protected]:8443/a/b/../c?q=1#f");
console.log(i, u.pathname, new URL("https://x/a/./b/../../c").pathname);
Command you ran:
perry compile url.ts -o url && ./url
Environment
- Perry version: 0.5.1661 (
mainat c9573408b, 2026-10-18, built from source); first seen on 0.5.1659 (f8f2a6044) - Host OS: Debian 13, Linux 6.12, x86-64
- Target: native
- Rust toolchain (if building from source): rustc 1.101.0-nightly (db8f076d2 2026-10-03), LLVM 22.1.8
- Installed via: from source:
cargo build --release -p perry -p perry-runtime-static -p perry-stdlib-static -p perry-ext-http, thenscripts/gc_call_effects/sidecars.sh target/release(required since d13485eea; without itperry compilestops with "the runtime GC effects sidecar cannot speak for the archives this program links")
Diagnostic output
0 /a/b/../c /a/./b/../../c
Anything else
Routers and path-based access checks rely on the normalized path (/public/../admin must become /admin).
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 166
- Avg merge
- 2h 54m
- Merged PRs (30d)
- 922
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PerryTS/perry
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
collect_packages_in_node_modules walks symlinked node_modules with no visited set: 3 fully-connected workspace packages hang perry compile at Collecting modules (100% CPU, no output)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 1 day
Similar issues
-
`image_generation`: `max_retries` is ignored for OpenAI-compatible providers (always 2 retries)Possibly taken @ericz7900 claimed this today. Openllm translation
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Help-Wanted Needs-Triage Package-Request
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
microsoft/winget-pkgs#456324 ·
Maintainers usually reply within 1 day
-
ai_p2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ClickHouse/ClickHouse#126833 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area/runtime good first issue size/S type/refactor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
lorica-labs/volant#681 ·
Maintainers usually reply within 1 day