Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fog/fog
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: lemurheavy/fog
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jun 17, 2013

  1. Copy the full SHA
    d0d3c38 View commit details

Commits on Apr 23, 2014

  1. Copy the full SHA
    f3dc268 View commit details
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/fog/aws/requests/storage/put_object_acl.rb
9 changes: 7 additions & 2 deletions lib/fog/aws/requests/storage/put_object_acl.rb
Original file line number Diff line number Diff line change
@@ -40,10 +40,15 @@ def put_object_acl(bucket_name, object_name, acl, options = {})
if acl.is_a?(Hash)
data = Fog::Storage::AWS.hash_to_acl(acl)
else
if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl)
if acl =~ /x-amz-grant/
name, value = acl.split ':'
headers[name] = value.strip
else
if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl)
raise Excon::Errors::BadRequest.new('invalid x-amz-acl')
end
headers['x-amz-acl'] = acl
end
headers['x-amz-acl'] = acl
end

headers['Content-MD5'] = Base64.encode64(Digest::MD5.digest(data)).strip