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

InvalidSignatureException when keep-alive connection is retried #56

Open
carlhoerberg opened this issue Feb 4, 2021 · 1 comment
Open

Comments

@carlhoerberg
Copy link
Contributor

When a long lived HTTP connection times out and the http client has to reconnect the before_request will be executed again, but then there are already headers which I think this code will use: https://github.com/taylorfinnell/awscr-signer/blob/master/src/awscr-signer/signers/v4.cr#L83-L85

but that results in a InvalidSignatureException. It can be solved by deleting the headers first:

      @http.before_request do |request|
        request.headers.delete "Authorization"
        request.headers.delete "X-Amz-Content-Sha256"
        request.headers.delete "X-Amz-Date"
        signer.sign(request)
      end
@jgaskins
Copy link

jgaskins commented Jun 8, 2021

iiiiinteresting. This sounds similar to the issue I've been having in #52. I'll try your solution in my shard and see if that helps.

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

No branches or pull requests

2 participants