no sense to add anything that is not 200.

This commit is contained in:
Artem Kramarenko 2012-05-30 18:45:36 +03:00
parent e59329ed38
commit f235eab442
1 changed files with 1 additions and 1 deletions

View File

@ -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|