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:
parent
dbf9baeddf
commit
35bb53430c
2 changed files with 6 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue