1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Merge pull request #2159 from dprater/master

Fix for https urls in atmos.
This commit is contained in:
Wesley Beary 2013-09-19 09:34:44 -07:00
commit fa5d270915

View file

@ -60,7 +60,8 @@ module Fog
file = directory.files.head(key) file = directory.files.head(key)
self.objectid = if file && file.to_s.strip != "" then file.attributes['x-emc-meta'].scan(/objectid=(\w+),/).flatten[0] else nil end self.objectid = if file && file.to_s.strip != "" then file.attributes['x-emc-meta'].scan(/objectid=(\w+),/).flatten[0] else nil end
if self.objectid && self.objectid.to_s.strip != "" if self.objectid && self.objectid.to_s.strip != ""
uri = URI::HTTP.build(:scheme => service.ssl? ? "http" : "https" , :host => service.host, :port => service.port.to_i, :path => "/rest/objects/#{self.objectid}" ) klass = service.ssl? ? URI::HTTPS : URI::HTTP
uri = klass.build(:host => service.host, :port => service.port.to_i, :path => "/rest/objects/#{self.objectid}" )
sb = "GET\n" sb = "GET\n"
sb += uri.path.downcase + "\n" sb += uri.path.downcase + "\n"