Skip to content

Commit 35bb534

Browse files
committed
* 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
1 parent dbf9bae commit 35bb534

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Thu Jun 16 14:26:46 2011 Eric Hodel <[email protected]>
2+
3+
* lib/webrick/httpservlet/erbhandler.rb: Allow the ERB document to
4+
alter the content-type of the response. [Ruby 1.9 - Bug #4685]
5+
16
Thu Jun 16 14:15:47 2011 Eric Hodel <[email protected]>
27

38
* lib/timeout.rb: Clarify timeout duration types. Patch by Alf Mikula.

lib/webrick/httpservlet/erbhandler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def do_GET(req, res)
5454
begin
5555
data = open(@script_filename){|io| io.read }
5656
res.body = evaluate(ERB.new(data), req, res)
57-
res['content-type'] =
57+
res['content-type'] ||=
5858
HTTPUtils::mime_type(@script_filename, @config[:MimeTypes])
5959
rescue StandardError => ex
6060
raise

0 commit comments

Comments
 (0)