diff options
author | danielsdeleo <dan@opscode.com> | 2013-10-08 17:43:04 -0700 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-10-08 17:43:04 -0700 |
commit | 61dd5990429afa67800607533b9c306d5633e5b8 (patch) | |
tree | b10f2d88a5bdaba0d8de1bdbdd4584e5aa3fc31e /lib/chef/http | |
parent | 2479acaaa3485d494c5f27765f87ff5b37550567 (diff) | |
download | chef-61dd5990429afa67800607533b9c306d5633e5b8.tar.gz |
Fix Chef::HTTP dependence on subclass methods
Diffstat (limited to 'lib/chef/http')
-rw-r--r-- | lib/chef/http/cookie_manager.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/http/cookie_manager.rb b/lib/chef/http/cookie_manager.rb index 067dc3ed22..f6dcf9aa32 100644 --- a/lib/chef/http/cookie_manager.rb +++ b/lib/chef/http/cookie_manager.rb @@ -32,16 +32,16 @@ class Chef end def handle_request(method, url, headers={}, data=false) - host, port = url.host, url.port - if @cookies.has_key?("#{host}:#{port}") - headers['Cookie'] = @cookies["#{host}:#{port}"] + @host, @port = url.host, url.port + if @cookies.has_key?("#{@host}:#{@port}") + headers['Cookie'] = @cookies["#{@host}:#{@port}"] end [method, url, headers, data] end def handle_response(http_response, rest_request, return_value) if http_response['set-cookie'] - @cookies["#{host}:#{port}"] = http_response['set-cookie'] + @cookies["#{@host}:#{@port}"] = http_response['set-cookie'] end [http_response, rest_request, return_value] end |