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

Avoid merging URLs in HttpUtils #14922

Conversation

Bencodes
Copy link
Contributor

@Bencodes Bencodes commented Mar 1, 2022

mergeUrls does not need to rebuild the URL from scratch if user information exists on the original URL. This behavior can actually break the 302 redirect due to subtle changes in the URL/encoding and should be avoided when possible.

This fixes #14866 by correcting the implementation of mergeUrls to match the documentation that was added instead of rebuilding the URL from scratch which breaks the encoding of signed URLs.

@bazel-io bazel-io closed this in 8cefb8b Mar 2, 2022
brentleyjones pushed a commit to brentleyjones/bazel that referenced this pull request Mar 4, 2022
`mergeUrls` does not need to rebuild the URL from scratch if user information exists on the original URL. This behavior can actually break the 302 redirect due to subtle changes in the URL/encoding and should be avoided when possible.

This fixes bazelbuild#14866 by correcting the implementation of `mergeUrls` to match the documentation that was added instead of rebuilding the URL from scratch which breaks the encoding of signed URLs.

Closes bazelbuild#14922.

PiperOrigin-RevId: 431935885
(cherry picked from commit 8cefb8b)
@brentleyjones
Copy link
Contributor

@bazel-io fork 5.1

Wyverald pushed a commit that referenced this pull request Mar 4, 2022
`mergeUrls` does not need to rebuild the URL from scratch if user information exists on the original URL. This behavior can actually break the 302 redirect due to subtle changes in the URL/encoding and should be avoided when possible.

This fixes #14866 by correcting the implementation of `mergeUrls` to match the documentation that was added instead of rebuilding the URL from scratch which breaks the encoding of signed URLs.

Closes #14922.

PiperOrigin-RevId: 431935885
(cherry picked from commit 8cefb8b)

Co-authored-by: Benjamin Lee <ben@ben.cm>
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.

http_archive reporting 404 Not Found instead of 302 Redirect
3 participants