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

Strip leading :// from URLs #232

Merged
merged 2 commits into from
Feb 12, 2022
Merged

Strip leading :// from URLs #232

merged 2 commits into from
Feb 12, 2022

Conversation

ducaale
Copy link
Owner

@ducaale ducaale commented Feb 12, 2022

@blyxxyz
Copy link
Collaborator

blyxxyz commented Feb 12, 2022

I'd do let url = url.strip_prefix("://”).or(url)

Maybe with a comment explaining the feature?

Copy link
Collaborator

@blyxxyz blyxxyz left a comment

Choose a reason for hiding this comment

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

A slight difference is that HTTPie interprets ://: as localhost while we don't. But that's probably a good thing, http://: doesn't get that treatment.

@ducaale ducaale merged commit fc9d033 into develop Feb 12, 2022
@ducaale ducaale deleted the quick-paste branch February 12, 2022 20:37
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