Sha256: ed30b81c2736bd14f4315da295efb6ef2ba5d26b15bf6fdeca15b773a9caef30
Contents?: true
Size: 873 Bytes
Versions: 84
Compression:
Stored size: 873 Bytes
Contents
module Katello module Util module HttpProxy def proxy_uri #Reset the scheme to proxy(s) based on http or https to handle cgi unescaping in rest-client if proxy scheme = 'proxy' if proxy_scheme == 'http' scheme = 'proxys' if proxy_scheme == 'https' uri = URI("#{scheme}://#{proxy_host}:#{proxy_port}") if proxy && proxy.username.present? uri.user = CGI.escape(proxy.username) uri.password = CGI.escape(proxy.password) end uri.to_s end end def proxy ::HttpProxy.default_global_content_proxy end def proxy_host URI(proxy.url).host end def proxy_scheme URI(proxy.url).scheme end def proxy_port URI(proxy.url).port end end # HttpProxy end # Util end # Katello
Version data entries
84 entries across 84 versions & 1 rubygems