aboutsummaryrefslogtreecommitdiffstats
path: root/lib/webrick
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-09 06:04:59 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-09 06:04:59 +0000
commit461bbe2f45478b779f172838ceeabb5dcaf1be5c (patch)
tree49ab9045143b3cb975033fbc793a13dc480496fd /lib/webrick
parent541d9d3536027fc86effc7677450f913d30950ee (diff)
downloadruby-461bbe2f45478b779f172838ceeabb5dcaf1be5c.tar.gz
* lib/webrick/httpservlet/erbhandler.rb
(WEBrick::HTTPServlet::ERBHandler#do_GET): should select media type by suffix of script filename. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick')
-rw-r--r--lib/webrick/httpservlet/erbhandler.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/webrick/httpservlet/erbhandler.rb b/lib/webrick/httpservlet/erbhandler.rb
index 40b7a57610..b9d5e65b65 100644
--- a/lib/webrick/httpservlet/erbhandler.rb
+++ b/lib/webrick/httpservlet/erbhandler.rb
@@ -29,7 +29,8 @@ module WEBrick
begin
data = open(@script_filename){|io| io.read }
res.body = evaluate(ERB.new(data), req, res)
- res['content-type'] = "text/html"
+ res['content-type'] =
+ HTTPUtils::mime_type(@script_filename, @config[:MimeTypes])
rescue StandardError => ex
raise
rescue Exception => ex