зеркало из https://github.com/microsoft/fog.git
distinguish between storage/cdn requests for rackspace files
This commit is contained in:
Родитель
7f03c7db3a
Коммит
45d644aab2
|
@ -21,12 +21,13 @@ module Fog
|
|||
@cdn_path = cdn_uri.path
|
||||
@cdn_port = cdn_uri.port
|
||||
@cdn_scheme = cdn_uri.scheme
|
||||
@cdn_connection = Fog::Connection.new("#{@cdn_scheme}://#{@cdn_host}:#{@cdn_port}")
|
||||
storage_uri = URI.parse(credentials['X-Storage-Url'])
|
||||
@storage_host = storage_uri.host
|
||||
@storage_path = storage_uri.path
|
||||
@storage_port = storage_uri.port
|
||||
@storage_scheme = storage_uri.scheme
|
||||
@connection = Fog::Connection.new("#{@storage_scheme}://#{@storage_host}:#{@storage_port}")
|
||||
@storage_connection = Fog::Connection.new("#{@storage_scheme}://#{@storage_host}:#{@storage_port}")
|
||||
end
|
||||
|
||||
def parse_data(data)
|
||||
|
@ -51,7 +52,7 @@ module Fog
|
|||
end
|
||||
|
||||
def cdn_request(params)
|
||||
response = @connection.request({
|
||||
response = @cdn_connection.request({
|
||||
:body => params[:body],
|
||||
:expects => params[:expects],
|
||||
:headers => {
|
||||
|
@ -69,7 +70,7 @@ module Fog
|
|||
end
|
||||
|
||||
def storage_request(params)
|
||||
response = @connection.request({
|
||||
response = @storage_connection.request({
|
||||
:body => params[:body],
|
||||
:expects => params[:expects],
|
||||
:headers => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче