31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/aws/core/http/net_http_handler.rb', line 31
def handle request, response
options = {}
options[:ssl] = request.use_ssl?
options[:proxy_uri] = request.proxy_uri
options[:ssl_verify_peer] = request.ssl_verify_peer?
options[:ssl_ca_file] = request.ssl_ca_file if request.ssl_ca_file
options[:ssl_ca_path] = request.ssl_ca_path if request.ssl_ca_path
connection = self.class.pool.connection_for(request.host, options)
connection.read_timeout = request.read_timeout
begin
http_response = connection.request(build_request(request))
response.body = http_response.body
response.status = http_response.code.to_i
response. = http_response.to_hash
rescue Timeout::Error, Errno::ETIMEDOUT => e
response.timeout = true
end
end
|