Skip to content

Commit

Permalink
Merge pull request #106 from fcheung/content_encoding_redux
Browse files Browse the repository at this point in the history
Another attempt to solve content-encoding header issues
  • Loading branch information
geemus committed May 7, 2015
2 parents d3b3f68 + d2287ba commit 818c8e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/fog/aws/storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -562,10 +562,10 @@ def request(params, &block)
params[:headers]['x-amz-content-sha256'] = 'STREAMING-AWS4-HMAC-SHA256-PAYLOAD'
params[:headers]['x-amz-decoded-content-length'] = params[:headers].delete 'Content-Length'

if params[:headers]['Content-Encoding']
encoding = "aws-chunked, #{params[:headers]['Content-Encoding']}"
if params[:headers]['Content-Encoding'] && params[:headers]['Content-Encoding'].to_s.length > 0
encoding = "aws-chunked,#{params[:headers]['Content-Encoding']}"
else
encoding = "aws-chunked, identity"
encoding = "aws-chunked"
end

params[:headers]['Content-Encoding'] = encoding
Expand Down

0 comments on commit 818c8e1

Please sign in to comment.