110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
# File 'lib/chef/http/basic_client.rb', line 110
def build_http_client
http_client = http_client_builder.new(host, port, nil)
http_client.proxy_port = nil if http_client.proxy_address.nil?
if url.scheme == HTTPS
configure_ssl(http_client)
end
opts = nethttp_opts.dup
opts["read_timeout"] ||= config[:rest_timeout]
opts["open_timeout"] ||= config[:rest_timeout]
opts.each do |key, value|
http_client.send(:"#{key}=", value)
end
if keepalives
http_client.start
else
http_client
end
end
|