mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
541d9d3536
commit
461bbe2f45
2 changed files with 8 additions and 1 deletions
|
@ -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>
|
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
|
* dir.c (dir_s_glob): Roll in Austin Ziegler's Dir.glob and
|
||||||
|
|
|
@ -29,7 +29,8 @@ module WEBrick
|
||||||
begin
|
begin
|
||||||
data = open(@script_filename){|io| io.read }
|
data = open(@script_filename){|io| io.read }
|
||||||
res.body = evaluate(ERB.new(data), req, res)
|
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
|
rescue StandardError => ex
|
||||||
raise
|
raise
|
||||||
rescue Exception => ex
|
rescue Exception => ex
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue