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

Addition of a sort to the keys will put the partNumber field in the expected place. This calculates the same signature as amazon. ISSUE161

This commit is contained in:
gavin 2011-02-08 20:33:53 +08:00 committed by Wesley Beary
parent 9408823e68
commit 11e85b60db

View file

@ -345,7 +345,7 @@ DATA
end
canonical_resource << params[:path].to_s
canonical_resource << '?'
for key in (params[:query] || {}).keys
for key in (params[:query] || {}).keys.sort
if %w{acl location logging notification partNumber policy requestPayment torrent uploadId uploads versionId versioning versions}.include?(key)
canonical_resource << "#{key}#{"=#{params[:query][key]}" unless params[:query][key].nil?}&"
end