Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow first path segments containing colons #192

Merged
merged 2 commits into from
Jan 10, 2022

Conversation

hannseman
Copy link
Contributor

Using urljoin for merging path segments where the first segment contains a colon will cause the base to be ignored.

>>> urljoin("/", "foo:bar")
'foo:bar'

See RFC3986

A path segment that contains a colon character (e.g., "this:that") cannot be used as the first segment of a relative-path reference, as it would be mistaken for a scheme name. Such a segment must be preceded by a dot-segment (e.g., "./this:that") to make a relative-path reference.

The easiest way is probably to not use urljoin and simply add a leading / when needed.

@lundberg lundberg merged commit 0c94bae into lundberg:master Jan 10, 2022
lundberg added a commit that referenced this pull request Jan 10, 2022
Fixed
- Allow first path segments containing colons, thanks @hannseman. (#192)
- Fix license classifier, thanks @shadchin (#195)
- Fix typos, thanks @kianmeng (#194)
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.

None yet

2 participants