Skip to content

Commit

Permalink
Presigned v4 signatures now places X-Amz-Acl and Content-MD5 on the p…
Browse files Browse the repository at this point in the history
…resigned url.
  • Loading branch information
trevorrowe committed May 1, 2014
1 parent 6b9a09c commit 72535aa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/aws/s3/presign_v4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,12 @@ def presign(method, options = {})
request.headers['host'] = request.host
signed_headers = 'Host'

# must be sent along with the PUT request headers
if options[:acl]
request.headers['X-Amz-Acl'] = options[:acl].to_s.gsub(/_/, '-')
signed_headers << ';X-Amz-Acl'
request.add_param("X-Amz-Acl", options[:acl].to_s.gsub(/_/, '-'))
end

# must be sent along with the PUT request headers
if options[:content_md5]
request.headers['Content-MD5'] = options[:content_md5]
signed_headers << ';Content-MD5'
request.add_param("Content-MD5", options[:content_md5])
end

request_params = Core::Signers::S3::QUERY_PARAMS.map do |p|
Expand Down

0 comments on commit 72535aa

Please sign in to comment.