1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #452 from lifo/master

Escape source object name for aws copy_object operation
This commit is contained in:
Wesley Beary 2011-07-28 17:06:00 -07:00
commit f3d92316b5

View file

@ -30,7 +30,7 @@ module Fog
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html
def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
headers = { 'x-amz-copy-source' => "/#{source_bucket_name}/#{source_object_name}" }.merge!(options)
headers = { 'x-amz-copy-source' => "/#{source_bucket_name}/#{CGI.escape(source_object_name)}" }.merge!(options)
request({
:expects => 200,
:headers => headers,