Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

check response body only when it is available

  • Loading branch information...
commit 604b6d3b680fd33a3c68f2108eb036e163c0bde0 1 parent 116c603
@flyerhzm authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/bullet/rack.rb
View
3  lib/bullet/rack.rb
@@ -28,7 +28,8 @@ def call(env)
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?
Please sign in to comment.
Something went wrong with that request. Please try again.