Skip to content

Commit

Permalink
Attempt to fix issue with Connection: keep-alive
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaskins committed Jun 8, 2021
1 parent 8433626 commit 5ca1401
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/client.cr
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ module AWS
@connection_pools[key] = DB::Pool.new(initial_pool_size: 0, max_idle_pool_size: 20) do
http = HTTP::Client.new(host, tls: tls)
http.before_request do |request|
# Apparently Connection: keep-alive causes trouble with signatures.
# See https://github.com/taylorfinnell/awscr-signer/issues/56#issue-801172534
request.headers.delete "Authorization"
request.headers.delete "X-Amz-Content-Sha256"
request.headers.delete "X-Amz-Date"
@signer.sign request
end

Expand Down

0 comments on commit 5ca1401

Please sign in to comment.