summaryrefslogtreecommitdiff
path: root/lib/chef/rest.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-10-04 13:59:14 -0700
committerdanielsdeleo <dan@opscode.com>2013-10-08 15:01:47 -0700
commit56cc74a74f627663f7b5bbfef3d477d885925f56 (patch)
tree33dc2dcf19af24f7877922aa560e337e0caa075f /lib/chef/rest.rb
parente97402977c16e86259e6dc234ca45ef79e858788 (diff)
downloadchef-56cc74a74f627663f7b5bbfef3d477d885925f56.tar.gz
Extract HTTP cookie handling to middleware
Diffstat (limited to 'lib/chef/rest.rb')
-rw-r--r--lib/chef/rest.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/rest.rb b/lib/chef/rest.rb
index 03ebb99152..fe416bc619 100644
--- a/lib/chef/rest.rb
+++ b/lib/chef/rest.rb
@@ -30,6 +30,7 @@ end
require 'chef/http/authenticator'
require 'chef/http/decompressor'
require 'chef/http/json_to_model_inflater'
+require 'chef/http/cookie_manager'
require 'chef/config'
require 'chef/exceptions'
require 'chef/platform/query_helpers'
@@ -58,6 +59,7 @@ class Chef
super(url, options)
@chef_json_inflater = JSONToModelInflater.new(options)
+ @cookie_manager = CookieManager.new(options)
@decompressor = Decompressor.new(options)
@authenticator = Authenticator.new(options)
end
@@ -134,7 +136,7 @@ class Chef
# Chef::REST doesn't define middleware in the normal way for backcompat reasons, so it's hardcoded here.
def middlewares
- [@chef_json_inflater, @decompressor, @authenticator]
+ [@chef_json_inflater, @cookie_manager, @decompressor, @authenticator]
end
alias :api_request :request