diff options
author | Tim Smith <tsmith@chef.io> | 2018-03-16 12:53:36 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-03-16 12:53:36 -0700 |
commit | 295d7ee3c9dc564a48d3d69d4512365ca8571402 (patch) | |
tree | 3574b90ed34980ae4d138edf500e59649e9c7e71 /lib/chef/http.rb | |
parent | 7ed08da937734d168fbe4742f3617ab90b614da4 (diff) | |
download | chef-295d7ee3c9dc564a48d3d69d4512365ca8571402.tar.gz |
Revert "Stripping out Authorization header on redirect to a different host"
This reverts commit 08b31872bf4094bbef474cae6de6c90fb4245a99.
Diffstat (limited to 'lib/chef/http.rb')
-rw-r--r-- | lib/chef/http.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb index a10906443b..241806da4e 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -381,9 +381,7 @@ class Chef elsif redirect_location = redirected_to(response) if [:GET, :HEAD].include?(method) follow_redirect do - redirected_url = url + redirect_location - headers.delete("Authorization") if url.host != redirected_url.host - send_http_request(method, redirected_url, headers, body, &response_handler) + send_http_request(method, url + redirect_location, headers, body, &response_handler) end else raise Exceptions::InvalidRedirect, "#{method} request was redirected from #{url} to #{redirect_location}. Only GET and HEAD support redirects." |