From 14922c70332c954a8d8a7fe32bf1384790be3e26 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 12 Feb 2014 09:01:30 +0000 Subject: [PATCH] httpservlet/filehandler.rb: pass queries * lib/webrick/httpservlet/filehandler.rb (set_dir_list): pass the given queries to subdirectories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/webrick/httpservlet/filehandler.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/webrick/httpservlet/filehandler.rb b/lib/webrick/httpservlet/filehandler.rb index 467b64f0c3..cc9db4a870 100644 --- a/lib/webrick/httpservlet/filehandler.rb +++ b/lib/webrick/httpservlet/filehandler.rb @@ -487,6 +487,7 @@ module WEBrick res.body << "\n" res.body << "\n" + query.sub!(/\A&/, '?') list.unshift [ "..", File::mtime(local_path+"/.."), -1 ] list.each{ |name, time, size| if name == ".." @@ -496,7 +497,7 @@ module WEBrick else dname = name end - s = "#{HTMLUtils::escape(dname)}" + s = "#{HTMLUtils::escape(dname)}" s << "" << (time ? time.strftime("%Y/%m/%d %H:%M") : "") << "" s << "" << (size >= 0 ? size.to_s : "-") << "\n" res.body << s