So, this might be the wrong way to do this, but I couldn’t think of another way. I have a non-standard artifact that I want to use Gradle to resolve as part of a configuration. So, I’m doing this:
https://gist.github.com/johnrengelman/c4098e4b7a39749f1f4b
There’s a weird issue in that the custom Ivy URL I’m using is from bitbucket.org which redirects to Amazon S3.
Looking at the debug logs, it looks like the the first attempt to HEAD the file follows the redirect and returns the correct data, but subsequent HEAD requests fail with a 403 Forbidden. I suspect this has to do with the Signature/Expires params in the request. It seems like the redirect is cached and reused. Which fails because of the Expire param. Instead the original URL should be used for each request.