lib/bullet/rack.rb in bullet-2.0.0.beta.4 vs lib/bullet/rack.rb in bullet-2.0.0.rc1

- old
+ new

@@ -24,12 +24,12 @@ [status, headers, [response_body]] end # fix issue if response's body is a Proc def empty?(response) - response == ["Not Found"] || - (response.is_a?(Array) && response.empty?) || + # response may be ["Not Found"], ["Move Permanently"], etc. + (response.is_a?(Array) && response.size <= 1) || !response.body.is_a?(String) || response.body.empty? end def check_html?(headers, response) headers['Content-Type'] and headers['Content-Type'].include? 'text/html' and response.body =~ %r{<html.*</html>}m @@ -39,6 +39,6 @@ headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate" headers["Pragma"] = "no-cache" headers["Expires"] = "Wed, 09 Sep 2009 09:09:09 GMT" end end -end \ No newline at end of file +end