summaryrefslogtreecommitdiff
path: root/lib/chef/http/simple.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/http/simple.rb')
-rw-r--r--lib/chef/http/simple.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/chef/http/simple.rb b/lib/chef/http/simple.rb
index d675a17ee8..40ac864224 100644
--- a/lib/chef/http/simple.rb
+++ b/lib/chef/http/simple.rb
@@ -7,15 +7,12 @@ class Chef
class HTTP
class Simple < HTTP
-
+ # When we 'use' middleware the first middleware is applied last on requests and
+ # first on responses (confusingly). So validatecontentlength must come before
+ # decompressor in order to be applied before decmopressing the response.
+ use ValidateContentLength
use Decompressor
use CookieManager
-
- # ValidateContentLength should come after Decompressor
- # because the order of middlewares is reversed when handling
- # responses.
- use ValidateContentLength
-
end
end
end