[storage] don't cgi escape slashes in authed urls
This commit is contained in:
parent
9548c0385b
commit
532bbe31e0
|
@ -28,7 +28,7 @@ module Fog
|
|||
:headers => {},
|
||||
:host => @host,
|
||||
:method => 'GET',
|
||||
:path => [bucket_name, CGI.escape(object_name)].join('/')
|
||||
:path => "#{bucket_name}/#{object_name}"
|
||||
}, expires)
|
||||
end
|
||||
|
||||
|
@ -47,7 +47,7 @@ module Fog
|
|||
:headers => {},
|
||||
:host => @host,
|
||||
:method => 'GET',
|
||||
:path => [bucket_name, CGI.escape(object_name)].join('/')
|
||||
:path => "#{bucket_name}/#{object_name}"
|
||||
}, expires)
|
||||
end
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module Fog
|
|||
:headers => {},
|
||||
:host => @host,
|
||||
:method => 'PUT',
|
||||
:path => [bucket_name, CGI.escape(object_name)].join('/')
|
||||
:path => "#{bucket_name}/#{object_name}"
|
||||
}, expires)
|
||||
end
|
||||
|
||||
|
@ -47,7 +47,7 @@ module Fog
|
|||
:headers => {},
|
||||
:host => @host,
|
||||
:method => 'PUT',
|
||||
:path => [bucket_name, CGI.escape(object_name)].join('/')
|
||||
:path => "#{bucket_name}/#{object_name}"
|
||||
}, expires)
|
||||
end
|
||||
|
||||
|
|
|
@ -81,7 +81,8 @@ module Fog
|
|||
query << "Signature=#{CGI.escape(signature(params))}"
|
||||
query << "Expires=#{params[:headers]['Date']}"
|
||||
bucket = params[:host].split('.').first
|
||||
"https://#{@host}/#{params[:path]}?#{query.join('&')}"
|
||||
path = CGI.escape(params[:path]).gsub('%2F', '/')
|
||||
"https://#{@host}/#{path}?#{query.join('&')}"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -23,9 +23,9 @@ module Fog
|
|||
end
|
||||
url({
|
||||
:headers => {},
|
||||
:host => "#{bucket_name}.#{@host}",
|
||||
:host => @host,
|
||||
:method => 'GET',
|
||||
:path => CGI.escape(object_name)
|
||||
:path => "#{bucket_name}/#{object_name}"
|
||||
}, expires)
|
||||
end
|
||||
|
||||
|
@ -42,9 +42,9 @@ module Fog
|
|||
end
|
||||
url({
|
||||
:headers => {},
|
||||
:host => "#{bucket_name}.#{@host}",
|
||||
:host => @host,
|
||||
:method => 'GET',
|
||||
:path => CGI.escape(object_name)
|
||||
:path => "#{bucket_name}/#{object_name}"
|
||||
}, expires)
|
||||
end
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ module Fog
|
|||
end
|
||||
url({
|
||||
:headers => {},
|
||||
:host => "#{bucket_name}.#{@host}",
|
||||
:host => @host,
|
||||
:method => 'PUT',
|
||||
:path => CGI.escape(object_name)
|
||||
:path => "#{bucket_name}/#{object_name}"
|
||||
}, expires)
|
||||
end
|
||||
|
||||
|
@ -42,9 +42,9 @@ module Fog
|
|||
end
|
||||
url({
|
||||
:headers => {},
|
||||
:host => "#{bucket_name}.#{@host}",
|
||||
:host => @host,
|
||||
:method => 'PUT',
|
||||
:path => CGI.escape(object_name)
|
||||
:path => "#{bucket_name}/#{object_name}"
|
||||
}, expires)
|
||||
end
|
||||
|
||||
|
|
|
@ -57,7 +57,8 @@ module Fog
|
|||
query << "GoogleAccessKeyId=#{@google_storage_access_key_id}"
|
||||
query << "Signature=#{CGI.escape(signature(params))}"
|
||||
query << "Expires=#{params[:headers]['Date']}"
|
||||
"http://#{params[:host]}/#{params[:path]}?#{query.join('&')}"
|
||||
path = CGI.escape(params[:path]).gsub('%2F', '/')
|
||||
"http://#{params[:host]}/#{path}?#{query.join('&')}"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue