diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-04-09 12:01:25 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-04-09 12:01:25 -0700 |
commit | 77f8c6eb236e71829249a34b549b639eae018137 (patch) | |
tree | 81c54cdfb7455be079f1a48b87b5da4a7cf5e0cb /lib/chef/http/basic_client.rb | |
parent | 1ff344fa64068c9b8638a11a781adcb72ddaed2f (diff) | |
download | chef-77f8c6eb236e71829249a34b549b639eae018137.tar.gz |
CHEF-5198: a better fix
- reverts previous fix to CHEF-5198
- applies stream handler middleware in (proper) reverse order
- adds debugging around middleware application
- moves dumping of response header debugging to before applying
response/streaming middleware
Diffstat (limited to 'lib/chef/http/basic_client.rb')
-rw-r--r-- | lib/chef/http/basic_client.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/chef/http/basic_client.rb b/lib/chef/http/basic_client.rb index 05ac662b7c..e800112dbe 100644 --- a/lib/chef/http/basic_client.rb +++ b/lib/chef/http/basic_client.rb @@ -61,7 +61,16 @@ class Chef base_headers.each do |name, value| Chef::Log.debug("#{name}: #{value}") end + Chef::Log.debug("---- End HTTP Request Header Data ----") http_client.request(http_request) do |response| + Chef::Log.debug("---- HTTP Status and Header Data: ----") + Chef::Log.debug("HTTP #{response.http_version} #{response.code} #{response.msg}") + + response.each do |header, value| + Chef::Log.debug("#{header}: #{value}") + end + Chef::Log.debug("---- End HTTP Status/Header Data ----") + yield response if block_given? # http_client.request may not have the return signature we want, so # force the issue: |