diff options
Diffstat (limited to 'lib/chef/http/http_request.rb')
-rw-r--r-- | lib/chef/http/http_request.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/chef/http/http_request.rb b/lib/chef/http/http_request.rb index 9569c4133a..dbb1e0ce70 100644 --- a/lib/chef/http/http_request.rb +++ b/lib/chef/http/http_request.rb @@ -20,9 +20,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require "uri" unless defined?(URI) -require "cgi" unless defined?(CGI) -require "net/http" unless defined?(Net::HTTP) +autoload :URI, "uri" +autoload :CGI, "cgi" +module Net + autoload :HTTP, File.expand_path("../monkey_patches/net_http", __dir__) +end require_relative "../dist" # To load faster, we only want ohai's version string. |