mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
897a42b063
commit
14922c7033
1 changed files with 2 additions and 1 deletions
|
@ -487,6 +487,7 @@ module WEBrick
|
|||
res.body << "</TR></THEAD>\n"
|
||||
res.body << "<TBODY>\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 = "<TR><TD class=\"name\"><A HREF=\"#{HTTPUtils::escape(name)}\">#{HTMLUtils::escape(dname)}</A></TD>"
|
||||
s = "<TR><TD class=\"name\"><A HREF=\"#{HTTPUtils::escape(name)}#{query if name.end_with?('/')}\">#{HTMLUtils::escape(dname)}</A></TD>"
|
||||
s << "<TD class=\"mtime\">" << (time ? time.strftime("%Y/%m/%d %H:%M") : "") << "</TD>"
|
||||
s << "<TD class=\"size\">" << (size >= 0 ? size.to_s : "-") << "</TD></TR>\n"
|
||||
res.body << s
|
||||
|
|
Loading…
Reference in a new issue