aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/webrick/httpservlet/erbhandler.rb3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e8dcf80533..41249c362d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Aug 9 15:03:20 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
+
+ * lib/webrick/httpservlet/erbhandler.rb
+ (WEBrick::HTTPServlet::ERBHandler#do_GET): should select media type
+ by suffix of script filename.
+
Mon Aug 9 12:51:43 2004 Dave Thomas <dave@pragprog.com>
* dir.c (dir_s_glob): Roll in Austin Ziegler's Dir.glob and
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