lib/bullet/rack.rb in bullet-4.14.6 vs lib/bullet/rack.rb in bullet-4.14.7
- old
+ new
@@ -8,14 +8,14 @@
def call(env)
return @app.call(env) unless Bullet.enable?
Bullet.start_request
status, headers, response = @app.call(env)
- return [status, headers, response] if file?(headers) || sse?(headers) || empty?(response)
response_body = nil
if Bullet.notification?
- if status == 200 && !response_body(response).frozen? && html_request?(headers, response)
+ if !file?(headers) && !sse?(headers) && !empty?(response) &&
+ status == 200 && !response_body(response).frozen? && html_request?(headers, response)
response_body = response_body(response)
append_to_html_body(response_body, footer_note) if Bullet.add_footer
append_to_html_body(response_body, Bullet.gather_inline_notifications)
headers['Content-Length'] = response_body.bytesize.to_s
end