This makes sense because the signed request is not for the final URL. I'm guessing this will happen with any service that responds with a redirect.
I think it would make sense to add support for not following redirects as a command line flag.
It might even make sense to follow the pattern from curl and only follow redirects if the caller explicitly request it, i.e. curl -L https://my.domain/redirecting.
Happy to take crack at the implementation I already have a rough working implementation, but want your input in the right approach before I make a PR.
We have an API Gateway Resource path that redirects to a pre-signed s3 URL. When I make that request with
awscurl
, it errors out with:and the pre-signed s3 URL in the python Traceback
This makes sense because the signed request is not for the final URL. I'm guessing this will happen with any service that responds with a redirect.
I think it would make sense to add support for not following redirects as a command line flag.
It might even make sense to follow the pattern from
curl
and only follow redirects if the caller explicitly request it, i.e.curl -L https://my.domain/redirecting
.Happy to take crack at the implementationI already have a rough working implementation, but want your input in the right approach before I make a PR.