Skip to content

Commit

Permalink
fixes xslt_transform tag when xml calls are targetted at https urls i…
Browse files Browse the repository at this point in the history
…n cleanslate
  • Loading branch information
Steven Spriggs committed Feb 26, 2019
1 parent 3d581f5 commit e243d58
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions hammer/services/tags/basic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,13 @@ def self.parse_date(str)

# cache [tag.cache_key, tag.globals.site, tag.globals.page], expires_in: cache_term_minutes.minutes do
begin
url = url = URI.parse(url)
request = req = Net::HTTP::Get.new(url.to_s)
response = Net::HTTP.start(url.host, url.port) {|http|
http.request(req)
}
uri = URI.parse(url)
response = Net::HTTP.start(uri.host, uri.port,
:use_ssl => uri.scheme == 'https') do |http|
request = Net::HTTP::Get.new uri
http.request request # Net::HTTPResponse object
end

#rescue raise(RuntimeTagError, "ERROR: Could not load the XML URL: #{url}")
rescue => e
return Hammer.error "Could not load the XML URL: #{url} due to #{e}"
Expand Down

0 comments on commit e243d58

Please sign in to comment.