Module: Net

Defined in:
lib/chef/monkey_patches/net-http.rb,
lib/chef/http.rb,
lib/chef/http/basic_client.rb,
lib/chef/http/http_request.rb,
lib/chef/provider/remote_file/ftp.rb,
lib/chef/provider/remote_file/sftp.rb,
lib/chef/provider/remote_file/content.rb,
lib/chef/http/socketless_chef_zero_client.rb

Overview

This is monkey-patch for ruby 3.1.x Due to change https://github.com/ruby/net-http/pull/10, when making net/http requests to a url which supports only IPv6 and not IPv4, ruby waits for IPv4 request to timeout first, then makes IPv6 request. This increased response time. NOTE 1: This is already reverted https://github.com/ruby/ruby/commit/f88bff770578583a708093f4a0d8b1483a1d2039 but under ruby 3.2.2 NOTE 2: We are patching action connect from here https://github.com/ruby/ruby/blob/f88bff770578583a708093f4a0d8b1483a1d2039/lib/net/http.rb#L1000

Defined Under Namespace

Classes: HTTP