> @@ -133,6 +133,12 @@ HttpRequest replaceSecurityTokenHeader(HttpRequest
> request, SessionCredentials c
> }
>
> HttpRequest replaceAuthorizationHeader(HttpRequest request, String
> signature) {
> + // Only add the Authorization header if the query string doesn't
> already contain
> + // the 'Signature' parameter, otherwise S3 will fail the request
> complaining about
> + // duplicate authentication methods.
> + if (request.getEndpoint().toString().contains("Signature")) {
@andrewgaul 'Signature' is not a header in this case, it is a query parameter.
@demobox Part of new functionality. Prior to this commit, 'Signature' would
never be part of the query string. Will look into unit tests but the live tests
already do verify this works as expected.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/71/files#r5348690