diff options
Diffstat (limited to 'lib/chef/http/cookie_manager.rb')
-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 |