lib/excon/response.rb in excon-0.16.9 vs lib/excon/response.rb in excon-0.16.10

- old
+ new

@@ -29,10 +29,10 @@ elsif (key.casecmp('Transfer-Encoding') == 0) && (value.casecmp('chunked') == 0) transfer_encoding_chunked = true end end - unless (params[:method].to_s.casecmp('HEAD') == 0) || NO_ENTITY.include?(response.status) + unless (['HEAD', 'CONNECT'].include?(params[:method].to_s.upcase)) || NO_ENTITY.include?(response.status) # check to see if expects was set and matched expected_status = !params.has_key?(:expects) || [*params[:expects]].include?(response.status) # if expects matched and there is a block, use it