distinguish between storage/cdn requests for rackspace files

This commit is contained in:
Wesley Beary 2010-01-09 17:32:25 -08:00
Родитель 7f03c7db3a
Коммит 45d644aab2
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -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 => {