Permalink
Browse files

Merge remote-tracking branch 'internal/master' into development

  • Loading branch information...
2 parents 0d7cfc0 + 78d63f5 commit 27d479dca235e0af075cbc76577f8cf03dc6a1ab @konstantin-dzreev konstantin-dzreev committed Jan 12, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/s3/right_s3_interface.rb
@@ -856,7 +856,7 @@ def get_object(bucket, key, headers={})
def generate_link(method, headers={}, expires=nil) #:nodoc:
# calculate request data
server, path, path_to_sign = fetch_request_params(headers)
- path_to_sign = CGI.unescape(path_to_sign)
+
# expiration time
expires ||= DEFAULT_EXPIRES_AFTER
expires = Time.now.utc + expires if expires.is_a?(Fixnum) && (expires < ONE_YEAR_IN_SECONDS)
@@ -950,7 +950,7 @@ def get_link(bucket, key, expires=nil, headers={}, response_params={})
else
response_params = ''
end
- generate_link('GET', headers.merge(:url=>"#{bucket}/#{CGI::escape key}#{response_params}"), expires)
+ generate_link('GET', headers.merge(:url=>"#{bucket}/#{URI::escape key}#{response_params}"), expires)
rescue
on_exception
end

0 comments on commit 27d479d

Please sign in to comment.