Skip to content

Conversation

@bioball
Copy link
Member

@bioball bioball commented Dec 1, 2025

This fixes an issue where URLs with schemes that contain +, -, and . would not be parsed correctly.

For example, foo+bar:///?baz.pkl would turn into foo+bar:///%3Fbaz.pkl. The query param is lost, and turned into the path.

Schemes allow for `+`, `-` and `.` characters.
Copy link
Contributor

@HT154 HT154 left a comment

Choose a reason for hiding this comment

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

Ahh, good catch!

Bytes(1, 2, 3, 4)
}
["absolute URI scheme with plus"] {
"Cannot find resource `foo+bar///?baz=buz`."
Copy link
Member Author

Choose a reason for hiding this comment

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

Prior to this fix, it was parsing the query param as the path segment. For example, this error message would look like:

Cannot find resource `foo+bar///%3Fbaz=buz`

And the query param would be lost.

@bioball bioball merged commit 53f3be6 into apple:main Dec 3, 2025
16 checks passed
@bioball bioball deleted the fix-uri-parsing branch December 3, 2025 18:11
HT154 pushed a commit that referenced this pull request Dec 3, 2025
This fixes an issue where URLs with schemes that contain `+`, `-`, and
`.` would not be parsed correctly.

For example, `foo+bar:///?baz.pkl` would turn into
`foo+bar:///%3Fbaz.pkl`. The query param is lost, and turned into the
path.
@HT154 HT154 mentioned this pull request Dec 3, 2025
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