Bug #4685 ยป erbhandler.allow_content_type_override.patch
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
|