diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-03-20 16:30:58 -0700 |
---|---|---|
committer | sersut <serdar@opscode.com> | 2014-03-27 15:37:26 -0700 |
commit | cc292cf145e1b6da7a600aa65f15adae79c4eb45 (patch) | |
tree | 4332072974a8138cca096b822a66b46d1c9473fd /lib/chef/rest.rb | |
parent | 57b1894328be78666c19a98a98d2d941d518d22b (diff) | |
download | chef-cc292cf145e1b6da7a600aa65f15adae79c4eb45.tar.gz |
CHEF-5041: fix middleware order
- the middleware for the *responses* are applied in reverse order, so
that the ValidateContentLength middleware must come *AFTER* the
Decompressor when we initialize them.
Diffstat (limited to 'lib/chef/rest.rb')
-rw-r--r-- | lib/chef/rest.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/rest.rb b/lib/chef/rest.rb index bfc07ebd62..1c5ee6aa84 100644 --- a/lib/chef/rest.rb +++ b/lib/chef/rest.rb @@ -66,13 +66,13 @@ class Chef @authenticator = Authenticator.new(options) @request_id = RemoteRequestID.new(options) - @middlewares << ValidateContentLength.new(options) @middlewares << JSONInput.new(options) @middlewares << JSONToModelOutput.new(options) @middlewares << CookieManager.new(options) @middlewares << @decompressor @middlewares << @authenticator @middlewares << @request_id + @middlewares << ValidateContentLength.new(options) end |