lib/bullet/rack.rb in bullet-4.1.1 vs lib/bullet/rack.rb in bullet-4.1.2
- old
+ new
@@ -26,10 +26,11 @@
# fix issue if response's body is a Proc
def empty?(response)
# response may be ["Not Found"], ["Move Permanently"], etc.
(response.is_a?(Array) && response.size <= 1) ||
- !response.body.is_a?(String) || response.body.empty?
+ !response.respond_to?(:body) ||
+ !response.body.is_a?(String) || response.body.empty?
end
# if send file?
def file?(headers)
headers["Content-Transfer-Encoding"] == "binary"