Sha256: e4fdcac2e9e1707bc7f214e8dcc6d8a62f122d4163f14c31860db0036fc4d099
Contents?: true
Size: 955 Bytes
Versions: 81
Compression:
Stored size: 955 Bytes
Contents
require 'katello/util/proxy_uri' 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 # this relies on katello/util/proxy_uri 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
81 entries across 81 versions & 1 rubygems