summaryrefslogtreecommitdiff
path: root/lib/webrick/httpservlet
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-16 05:37:31 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-16 05:37:31 +0000
commit35bb53430c634361ba84a48326a236a53a2fd680 (patch)
tree97b5b209c337ccc1b38515f1e60d4e338ae1589b /lib/webrick/httpservlet
parentdbf9baeddf8679c0dfeb905d720a64e657861675 (diff)
downloadruby-35bb53430c634361ba84a48326a236a53a2fd680.tar.gz
* 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
Diffstat (limited to 'lib/webrick/httpservlet')
-rw-r--r--lib/webrick/httpservlet/erbhandler.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/webrick/httpservlet/erbhandler.rb b/lib/webrick/httpservlet/erbhandler.rb
index 621d5206c0..34b4b9e68b 100644
--- a/lib/webrick/httpservlet/erbhandler.rb
+++ b/lib/webrick/httpservlet/erbhandler.rb
@@ -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