Merge pull request #10 from artemk/f235eab4421a2fb19e53a18ff6e7f33c0c25768f

no sense to add anything that is not 200.
This commit is contained in:
John Bintz 2012-06-05 03:50:03 -07:00
commit 2ebc246b61
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|