[前][次][番号順一覧][スレッド一覧]

ruby-changes:28807

From: nobu <ko1@a...>
Date: Mon, 20 May 2013 22:42:48 +0900 (JST)
Subject: [ruby-changes:28807] nobu:r40859 (trunk): * lib/webrick/httpservlet/filehandler.rb (set_dir_list): share title and h1.

nobu	2013-05-20 22:41:10 +0900 (Mon, 20 May 2013)

  New Revision: 40859

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40859

  Log:
    * lib/webrick/httpservlet/filehandler.rb (set_dir_list): share title and h1.

  Modified files:
    trunk/lib/webrick/httpservlet/filehandler.rb

Index: lib/webrick/httpservlet/filehandler.rb
===================================================================
--- lib/webrick/httpservlet/filehandler.rb	(revision 40858)
+++ lib/webrick/httpservlet/filehandler.rb	(revision 40859)
@@ -439,12 +439,15 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/lib/webrick/httpservlet/filehandler.rb#L439
 
         res['content-type'] = "text/html"
 
+        title = "Index of #{HTMLUtils::escape(req.path)}"
         res.body = <<-_end_of_html_
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <HTML>
-  <HEAD><TITLE>Index of #{HTMLUtils::escape(req.path)}</TITLE></HEAD>
+  <HEAD>
+    <TITLE>#{title}</TITLE>
+  </HEAD>
   <BODY>
-    <H1>Index of #{HTMLUtils::escape(req.path)}</H1>
+    <H1>#{title}</H1>
         _end_of_html_
 
         res.body << "<PRE>\n"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]