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

"net/url" does not support parsing all supported protocols, such as gcs or s3 #476

Open
bisharaah opened this issue Mar 4, 2024 · 0 comments

Comments

@bisharaah
Copy link

bisharaah commented Mar 4, 2024

Hello,

Noticed that in helper/url/url.go you are using "net/url" to parse, but as far as I know, it does not support parsing all supported protocols formats such as:
gcs::https://www.googleapis.com/storage/v1/bucket1/foo.img
The parsed url.URL output will have:

  1. Scheme as gcs
  2. Opaque as :https://www.googleapis.com/storage/v1/bucket1/foo.img
  3. everything else is either an empty string, false or nil

This is causing the client's GetChecksum call to fail because if the checksum is of a similar format, for example file:gcs::https://www.googleapis.com/storage/v1/bucket1/SHA256SUMS, it will pass the request Src to parse and pass the empty string as the checksummedPath to the checksumFromFile call which will cause it to not find any suitable checksum.

Please fix.

Thanks,

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