diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-04-09 09:51:05 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-04-09 09:51:05 -0700 |
commit | 53d16b4fb428f8b06e47ac69066af4fc0c7e1910 (patch) | |
tree | 2f1dfa283c39504cfd07335169e4ac403b1a8103 /lib/chef/http | |
parent | 0d7f637b663f53a07ca375d0953658ad283fe6a5 (diff) | |
download | chef-53d16b4fb428f8b06e47ac69066af4fc0c7e1910.tar.gz |
reorder middleware in chef::http::simple
the api here reverses the order of the reversed order in the
responses for some reason. this broke remote_file for most of the
internet.
Diffstat (limited to 'lib/chef/http')
-rw-r--r-- | lib/chef/http/simple.rb | 11 |
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 |