diff options
author | Thom May <thom@may.lt> | 2016-10-18 13:57:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-18 13:57:29 +0100 |
commit | 9963347e420c98590576b8dfeb9afe21bb51af2f (patch) | |
tree | ee6044cd525f063039f5855e14c4d0938682e970 | |
parent | 1a58b3e8055a2f374e0da38eb7a1c49d035a7c1e (diff) | |
parent | f3e8c95def2f34f15fcb114284f86060a7fa73d5 (diff) | |
download | chef-9963347e420c98590576b8dfeb9afe21bb51af2f.tar.gz |
Merge pull request #5462 from sds/rebuild-headers-on-retry
Rebuild HTTP headers on each retried request
-rw-r--r-- | lib/chef/http.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb index 924081bc6b..dd3c55bf19 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -329,10 +329,9 @@ class Chef # Runs a synchronous HTTP request, with no middleware applied (use #request # to have the middleware applied). The entire response will be loaded into memory. # @api private - def send_http_request(method, url, headers, body, &response_handler) - headers = build_headers(method, url, headers, body) - + def send_http_request(method, url, base_headers, body, &response_handler) retrying_http_errors(url) do + headers = build_headers(method, url, base_headers, body) client = http_client(url) return_value = nil if block_given? |