Skip to content

Fix parsing of paths and queries in URLs - #218

Merged
czechboy0 merged 3 commits into
apple:mainfrom
czechboy0:hd-question-mark-in-fragment-parsing
Oct 19, 2026
Merged

czechboy0 merged 3 commits into
apple:mainfrom
czechboy0:hd-question-mark-in-fragment-parsing

Conversation

@czechboy0

Copy link
Copy Markdown
Contributor

Motivation

When a URL was passed to the server with a fragment which contained the first question mark in the URL, it'd lead to a crash.

Example: /api#frag?x.

Modifications

Make the parsing more robust and ensure we only look for the first question mark before the first #.

Result

Avoids a crash on a URL like above.

Test Plan

Expanded unit tests to cover this.

@czechboy0 czechboy0 added the 🔨 semver/patch No public API change. label Sep 30, 2026
@czechboy0
czechboy0 enabled auto-merge (squash) September 30, 2026 10:49

@simonjbeaumont simonjbeaumont left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice catch.

@czechboy0 czechboy0 self-assigned this Oct 19, 2026
@czechboy0
czechboy0 merged commit 6927ad4 into apple:main Oct 19, 2026
50 of 52 checks passed
@czechboy0
czechboy0 deleted the hd-question-mark-in-fragment-parsing branch October 19, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants