Project

General

Profile

Bug #4685 ยป erbhandler.allow_content_type_override.patch

Patch to allow the content_type to be overridden - drbrain (Eric Hodel), 05/13/2011 07:38 AM

View differences:

lib/webrick/httpservlet/erbhandler.rb (working copy)
begin
data = open(@script_filename){|io| io.read }
res.body = evaluate(ERB.new(data), req, res)
res['content-type'] =
res['content-type'] ||=
HTTPUtils::mime_type(@script_filename, @config[:MimeTypes])
rescue StandardError => ex
raise
    (1-1/1)