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

new_http_archive doesn't follow http redirects? #527

Closed
zaphar opened this issue Oct 22, 2015 · 2 comments
Closed

new_http_archive doesn't follow http redirects? #527

zaphar opened this issue Oct 22, 2015 · 2 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: documentation (cleanup)

Comments

@zaphar
Copy link
Contributor

zaphar commented Oct 22, 2015

If I put the following in a WORKSPACE file it fails with a checksum error. The reason appears to be that it is pulling down the html redirect page instead of following it. The url does a 302 redirect to a cdn for the download. This is likely to be the case for many different projects that offer http download.

Is the failure to follow redirects intended or is this a bug?

new_http_archive(
name="nunit",
build_file="tools/build_defs/dotnet/BUILD.nunit",
sha256="1bd925514f31e7729ccde40a38a512c2accd86895f93465f3dfe6d0b593d7170",
type="zip",
url="http://github.com/nunit/nunitv2/releases/download/2.6.4/NUnit-2.6.4.zip"
)

@kchodorow
Copy link
Contributor

@kchodorow kchodorow self-assigned this Oct 23, 2015
@zaphar
Copy link
Contributor Author

zaphar commented Oct 24, 2015

Okay I had some more time to look into this and it looks like the problem is that the redirect goes from a http to an https url and the java api doesn't automatically follow that. Changing the url to an https url works.

Not really sure if this should be considered a bug or a feature now. But at the least it probably warrants some explanatory documentation or a FAQ entry.

@damienmg damienmg added type: feature request P3 We're not considering working on this, but happy to review a PR. (No assignee) external repositories labels Nov 17, 2015
hermione521 pushed a commit to hermione521/bazel that referenced this issue Jun 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: documentation (cleanup)
Projects
None yet
Development

No branches or pull requests

3 participants