diff options
author | Sander van Harmelen <sander@xanzy.io> | 2014-09-09 08:01:31 +0200 |
---|---|---|
committer | Sander van Harmelen <sander@xanzy.io> | 2014-09-09 08:01:31 +0200 |
commit | bb5a655942e9cb9168c68921ca8ccd1dbbecc988 (patch) | |
tree | 04ffe6eae4c315d5d5b5ddc2430e54fae158d714 /lib/chef/http.rb | |
parent | 3e17227e501fe9ed2d4d4b17787f0cfbebea939b (diff) | |
download | chef-bb5a655942e9cb9168c68921ca8ccd1dbbecc988.tar.gz |
Updated the code after discussing with @btm, @lamont-granquist and @danielsdeleo
Diffstat (limited to 'lib/chef/http.rb')
-rw-r--r-- | lib/chef/http.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb index 46cd6faa25..612dd79c5b 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -208,9 +208,6 @@ class Chef URI.parse(path) elsif path.nil? or path.empty? URI.parse(@url) - elsif @url.is_a?(URI) - @url.path = path - return @url else # The regular expressions used here are to make sure '@url' does not have # any trailing slashes and 'path' does not have any leading slashes. This @@ -274,7 +271,7 @@ class Chef elsif redirect_location = redirected_to(response) if [:GET, :HEAD].include?(method) follow_redirect do - send_http_request(method, create_url(redirect_location), 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." |