erbhandler.allow_content_type_override.patch

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

Download (583 Bytes)

View differences:

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