1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/webrick/httpservlet/erbhandler.rb: Allow the ERB document to

alter the content-type of the response.  [Ruby 1.9 - Bug #4685]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2011-06-16 05:37:31 +00:00
parent dbf9baeddf
commit 35bb53430c
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Thu Jun 16 14:26:46 2011 Eric Hodel <drbrain@segment7.net>
* lib/webrick/httpservlet/erbhandler.rb: Allow the ERB document to
alter the content-type of the response. [Ruby 1.9 - Bug #4685]
Thu Jun 16 14:15:47 2011 Eric Hodel <drbrain@segment7.net>
* lib/timeout.rb: Clarify timeout duration types. Patch by Alf Mikula.

View file

@ -54,7 +54,7 @@ module WEBrick
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