Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

URL: dot segments (`.` and `..`) are not removed from the pathname

Open
#12,864 0 comments 0 reactions 0 assignees View on GitHub

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

bug

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 (main at 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, then scripts/gc_call_effects/sidecars.sh target/release (required since d13485eea; without it perry compile stops 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PerryTS/perry

All issues in PerryTS/perry

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.