Do not fail without content type #5

Merged
enriclluelles merged 2 commits from do_not_fail_without_content_type into master 2012-01-23 23:13:12 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 90b9a75b35 - Show all commits

View File

@ -50,7 +50,7 @@ module Rack
status, headers, body = @app.call(env) status, headers, body = @app.call(env)
if !ignored?(env['PATH_INFO']) && !bad_browser?(env['HTTP_USER_AGENT']) if !ignored?(env['PATH_INFO']) && !bad_browser?(env['HTTP_USER_AGENT'])
if headers['Content-Type'][%r{text/html}] if headers['Content-Type'] && headers['Content-Type'][%r{text/html}]
content_length = 0 content_length = 0
body.each do |line| body.each do |line|