From f235eab4421a2fb19e53a18ff6e7f33c0c25768f Mon Sep 17 00:00:00 2001 From: Artem Kramarenko Date: Wed, 30 May 2012 18:45:36 +0300 Subject: [PATCH] no sense to add anything that is not 200. --- lib/rack/livereload.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rack/livereload.rb b/lib/rack/livereload.rb index 45b5798..d9fdb21 100644 --- a/lib/rack/livereload.rb +++ b/lib/rack/livereload.rb @@ -62,7 +62,7 @@ module Rack body.close if body.respond_to?(:close) if !ignored?(env['PATH_INFO']) && !bad_browser?(env['HTTP_USER_AGENT']) - if headers['Content-Type'] && headers['Content-Type'][%r{text/html}] + if headers['Content-Type'] && status == 200 && headers['Content-Type'][%r{text/html}] content_length = 0 new_body.each do |line|