mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
distinguish between storage/cdn requests for rackspace files
This commit is contained in:
parent
7f03c7db3a
commit
45d644aab2
1 changed files with 4 additions and 3 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Reference in a new issue