Skip to content

fix: parse absolute-form request targets safely - #451

Merged
mcollina merged 1 commit into
mainfrom
fix/absolute-form-empty-path
Aug 21, 2026
Merged

mcollina merged 1 commit into
mainfrom
fix/absolute-form-empty-path

Conversation

@mcollina

Copy link
Copy Markdown
Collaborator

Summary

  • replace regex-based absolute-form path extraction with component-aware HTTP(S) URL handling
  • normalize an empty absolute-form path to / without treating query slashes as path data
  • preserve the original query string and route invalid absolute-form targets through onBadUrl
  • cover direct lookup, router dispatch, and a real Node.js HTTP server request

Validation

  • npm test
  • git diff --check

@delvedor delvedor left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Less regexes for a better world!

@mcollina
mcollina merged commit b8f9502 into main Aug 21, 2026
14 checks passed
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.

2 participants