Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 27d479dca235e0af075cbc76577f8cf03dc6a1ab 2 parents 0d7cfc0 + 78d63f5
Konstantin Dzreev konstantin-dzreev authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/s3/right_s3_interface.rb
4 lib/s3/right_s3_interface.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.