diff options
author | Irving Popovetsky <irving@getchef.com> | 2015-05-05 12:18:01 -0700 |
---|---|---|
committer | Irving Popovetsky <irving@getchef.com> | 2015-05-05 12:18:01 -0700 |
commit | 1dfa55fe77fe03cdd90a342a73b4478e1e16d1e8 (patch) | |
tree | e313dfbdf94490cafc1d3525880b27a93d7be8ce | |
parent | 014113b5c6a8f1650c5968da1385a4ae4237b84e (diff) | |
download | chef-1dfa55fe77fe03cdd90a342a73b4478e1e16d1e8.tar.gz |
Use Chef::HTTP::BasicClient instead of Net::HTTP to get both proxy and ssl goodness
-rw-r--r-- | lib/chef/cookbook_site_streaming_uploader.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/chef/cookbook_site_streaming_uploader.rb b/lib/chef/cookbook_site_streaming_uploader.rb index 3351eecc52..1fabba5b2f 100644 --- a/lib/chef/cookbook_site_streaming_uploader.rb +++ b/lib/chef/cookbook_site_streaming_uploader.rb @@ -142,13 +142,8 @@ class Chef req.content_type = 'multipart/form-data; boundary=' + boundary unless parts.empty? req.body_stream = body_stream - http = Net::HTTP.new(url.host, url.port) - if url.scheme == "https" - http.use_ssl = true - Chef::HTTP::DefaultSSLPolicy.apply_to(http) - end + http = Chef::HTTP::BasicClient.new(url).http_client res = http.request(req) - #res = http.start {|http_proc| http_proc.request(req) } # alias status to code and to_s to body for test purposes # TODO: stop the following madness! |