From ef16914521dda4fcc8ee77ab44696fa58b749d37 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 1 Sep 2014 22:45:21 +0000 Subject: extras/autoindex: do not link beyond top-level No need to waste space on this (and trigger "Bad partial reference!" warnings on lynx) --- test/test_extras_autoindex.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/test_extras_autoindex.rb') diff --git a/test/test_extras_autoindex.rb b/test/test_extras_autoindex.rb index ed0e1d5..e17234f 100644 --- a/test/test_extras_autoindex.rb +++ b/test/test_extras_autoindex.rb @@ -44,8 +44,12 @@ class TestExtrasAutoindex < Testcase res = http.request(Net::HTTP::Get.new("/")) assert_equal 200, res.code.to_i + refute_match %r{\.\./}, res.body, "top level should not link to parent" assert_match %r{foo}, res.body - assert_match %r{bar/}, res.body + + res = http.request(Net::HTTP::Get.new("/bar/")) + assert_equal 200, res.code.to_i + assert_match %r{\.\./}, res.body, "link to parent present" end ensure quit_wait pid -- cgit v1.2.3-24-ge0c7