no sense to add anything that is not 200. #10

Merged
artemk merged 1 commits from f235eab4421a2fb19e53a18ff6e7f33c0c25768f into master 2012-06-05 10:50:03 +00:00

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|