mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[rackspace|lb] fixed issue where double paths cause API errors
This commit is contained in:
parent
829ca9275a
commit
af666126d6
1 changed files with 2 additions and 2 deletions
|
@ -110,7 +110,7 @@ module Fog
|
||||||
uri = URI.parse(options[:rackspace_lb_endpoint] || DFW_ENDPOINT)
|
uri = URI.parse(options[:rackspace_lb_endpoint] || DFW_ENDPOINT)
|
||||||
@host = uri.host
|
@host = uri.host
|
||||||
@persistent = options[:persistent] || false
|
@persistent = options[:persistent] || false
|
||||||
@path = uri.path
|
@path = uri.path.end_with?('/') ? uri.path.chop : uri.path
|
||||||
@port = uri.port
|
@port = uri.port
|
||||||
@scheme = uri.scheme
|
@scheme = uri.scheme
|
||||||
|
|
||||||
|
@ -137,6 +137,7 @@ module Fog
|
||||||
rescue Excon::Errors::InternalServerError => error
|
rescue Excon::Errors::InternalServerError => error
|
||||||
raise InternalServerError.slurp error
|
raise InternalServerError.slurp error
|
||||||
rescue Excon::Errors::HTTPStatusError => error
|
rescue Excon::Errors::HTTPStatusError => error
|
||||||
|
puts error.inspect
|
||||||
raise ServiceError.slurp error
|
raise ServiceError.slurp error
|
||||||
end
|
end
|
||||||
unless response.body.empty?
|
unless response.body.empty?
|
||||||
|
@ -156,7 +157,6 @@ module Fog
|
||||||
account_id = credentials['X-Server-Management-Url'].match(/.*\/([\d]+)$/)[1]
|
account_id = credentials['X-Server-Management-Url'].match(/.*\/([\d]+)$/)[1]
|
||||||
@path = "#{@path}/#{account_id}"
|
@path = "#{@path}/#{account_id}"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue