summaryrefslogtreecommitdiff
path: root/lib/chef/http
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-10-28 14:11:53 -0700
committerdanielsdeleo <dan@opscode.com>2013-10-28 14:11:53 -0700
commit8cc0c8060c103cfe8d7875c8611dde47865d4214 (patch)
tree7a6875d1e6cf6dbb3465aa74ae38c09fd5c14c84 /lib/chef/http
parent0e2afa8d488e1b8063114e0461bbdd0c380b0b5e (diff)
downloadchef-8cc0c8060c103cfe8d7875c8611dde47865d4214.tar.gz
Debug request headers
Diffstat (limited to 'lib/chef/http')
-rw-r--r--lib/chef/http/basic_client.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/http/basic_client.rb b/lib/chef/http/basic_client.rb
index 5ee0fbf88d..c3421703d5 100644
--- a/lib/chef/http/basic_client.rb
+++ b/lib/chef/http/basic_client.rb
@@ -57,6 +57,10 @@ class Chef
def request(method, url, req_body, base_headers={})
http_request = HTTPRequest.new(method, url, req_body, base_headers).http_request
Chef::Log.debug("Initiating #{method} to #{url}")
+ Chef::Log.debug("---- HTTP Request Header Data: ----")
+ base_headers.each do |name, value|
+ Chef::Log.debug("#{name}: #{value}")
+ end
http_client.request(http_request) do |response|
yield response if block_given?
# http_client.request may not have the return signature we want, so