From d2287ba09cafe2c4e9225d50556fa1f2824ead57 Mon Sep 17 00:00:00 2001 From: Frederick Cheung Date: Thu, 7 May 2015 08:19:06 +0100 Subject: [PATCH] Another attempt to solve content-encoding header issues identity should not be used as a content encoding --- lib/fog/aws/storage.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/fog/aws/storage.rb b/lib/fog/aws/storage.rb index 75b851bef9..2f6fdee59e 100644 --- a/lib/fog/aws/storage.rb +++ b/lib/fog/aws/storage.rb @@ -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