lib/bullet/rack.rb in bullet-2.0.0.beta.3 vs lib/bullet/rack.rb in bullet-2.0.0.beta.4
- old
+ new
@@ -24,10 +24,12 @@
[status, headers, [response_body]]
end
# fix issue if response's body is a Proc
def empty?(response)
- (response.is_a?(Array) && response.empty?) || !response.body.is_a?(String) || response.body.empty?
+ response == ["Not Found"] ||
+ (response.is_a?(Array) && response.empty?) ||
+ !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
end
\ No newline at end of file