Skip to content

Commit

Permalink
Merge pull request #327 from rodrigoapereira/fix_host_canonical_headers
Browse files Browse the repository at this point in the history
fix host header with another port on s3
  • Loading branch information
geemus authored Dec 6, 2016
2 parents 9640d7a + c3131a4 commit 0a247f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/fog/aws/storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def v4_signed_params_for_url(params, expires)

params = request_params(params)
params[:headers][:host] = params[:host]
params[:headers][:host] += ":#{params[:port]}" if params.fetch(:port, nil)

signature_query_params = @signer.signature_parameters(params, now, "UNSIGNED-PAYLOAD")
params[:query] = (params[:query] || {}).merge(signature_query_params)
Expand Down

0 comments on commit 0a247f8

Please sign in to comment.