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

URLs without a scheme don't work #50

Open
shanepelletier opened this issue Jan 10, 2023 · 0 comments
Open

URLs without a scheme don't work #50

shanepelletier opened this issue Jan 10, 2023 · 0 comments

Comments

@shanepelletier
Copy link
Contributor

I'm undecided how this should be fixed, since surl 0.8 also doesn't work without a scheme, but it does at least return a more useful error message stating such. SCA doesn't work without the scheme specified, so "dashboard.staging.snapcraft.io" errors (specifically in surl v1, it complains about the authorization header) but "https://dashboard.staging.snapcraft.io" works fine.

Three possible solutions are:

  1. Detect when the scheme is missing and error
  2. Detect when the scheme is missing, add "http://" (which gets automatically redirected to "https://" for the deployed services and would also work for local services), and warn the user that the URL they used was modified to work
  3. Detect the scheme is missing and add "http://"

There's a possibility that solution 3 is the easiest, if curl has a command-line option to automatically do the fixing for us.

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

No branches or pull requests

1 participant