lib/fog/vcloud/parser.rb in fog-0.1.4 vs lib/fog/vcloud/parser.rb in fog-0.1.5
- old
+ new
@@ -8,10 +8,13 @@
def generate_link(attributes)
link = Struct::VcloudLink.new
until attributes.empty?
link[attributes.shift.downcase] = attributes.shift
end
+ if link.href
+ link.href = URI.parse(link.href)
+ end
link
end
def handle_root(attributes)
root = {}
@@ -21,10 +24,10 @@
root[attribute.first.downcase] = attribute.last
else
root[attributes.shift.downcase] = attributes.shift
end
end
- @response.href = root['href']
+ @response.href = URI.parse(root['href'])
@response.name = root['name']
@response.type = root['type']
@response.xmlns = root['xmlns']
end
end