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

be less picky about keys for s3.objects.all(options), and CGI.escape the values passed to the call

This commit is contained in:
Wesley Beary 2009-12-24 16:10:14 -08:00
parent 2fddeb0110
commit 34a7c0d0f8
2 changed files with 2 additions and 2 deletions

View file

@ -15,7 +15,7 @@ module Fog
def all(options = {})
collection = bucket.collection.get(
bucket.name,
options.reject {|key, value| !['delimiter', 'marker', 'max-keys', 'prefix'].include?(key)}
options
)
collection && collection.objects
end

View file

@ -39,7 +39,7 @@ unless Fog.mocking?
end
query = ''
for key, value in options
query << "#{key}=#{value};"
query << "#{key}=#{CGI.escape(value).gsub(/\+/, '%20')};"
end
query.chop!
request({