summaryrefslogtreecommitdiff
path: root/tests/docroot
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-08-25 21:57:42 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2021-09-08 15:06:07 -0400
commitca2898f67896be77d4556c85a536975319a99dee (patch)
treea16f8896e23536fb72d3341204aed0fc63278e92 /tests/docroot
parent7a21b3856e30d307934a286c2b70aa9455820e68 (diff)
downloadlighttpd-git-ca2898f67896be77d4556c85a536975319a99dee.tar.gz
[tests] t/test_mod_indexfile
also remove some now-redundant tests from request.t and reduce scripts and directories under tests (because automake is sloooow and the fewer dirs, the better)
Diffstat (limited to 'tests/docroot')
-rwxr-xr-xtests/docroot/www/404.pl4
-rw-r--r--tests/docroot/www/Makefile.am2
-rwxr-xr-xtests/docroot/www/cgi.pl3
-rw-r--r--tests/docroot/www/indexfile/Makefile.am1
-rw-r--r--tests/docroot/www/indexfile/index.pl8
5 files changed, 6 insertions, 12 deletions
diff --git a/tests/docroot/www/404.pl b/tests/docroot/www/404.pl
index 5b5672cf..eb5df2ee 100755
--- a/tests/docroot/www/404.pl
+++ b/tests/docroot/www/404.pl
@@ -34,6 +34,10 @@ elsif ($request_uri =~ m/^\/dynamic\/redirect_status\// ) {
"\n",
"REDIRECT_STATUS\n";
}
+elsif ($ENV{PATH_INFO} eq "/internal-redir" ) {
+ # (not actually 404 error, but use separate script from cgi.pl for testing)
+ print "Status: 200\r\n\r\n";
+}
else {
print "Status: 500\n",
"Content-Type: text/plain\n",
diff --git a/tests/docroot/www/Makefile.am b/tests/docroot/www/Makefile.am
index 4d702f73..41411e82 100644
--- a/tests/docroot/www/Makefile.am
+++ b/tests/docroot/www/Makefile.am
@@ -9,5 +9,3 @@ EXTRA_DIST=\
ssi-include.shtml \
ssi-include.txt \
ssi.shtml
-SUBDIRS=\
- indexfile
diff --git a/tests/docroot/www/cgi.pl b/tests/docroot/www/cgi.pl
index 3e7ea872..97e00d31 100755
--- a/tests/docroot/www/cgi.pl
+++ b/tests/docroot/www/cgi.pl
@@ -8,7 +8,8 @@ if ($ENV{"QUERY_STRING"} =~ /^env=(\w+)/) {
# redirection
if ($ENV{"QUERY_STRING"} eq "internal-redir") {
- print "Location: /indexfile/index.pl/foo\r\n\r\n";
+ # (not actually 404 error, but use separate script from cgi.pl for testing)
+ print "Location: /404.pl/internal-redir\r\n\r\n";
exit 0;
}
diff --git a/tests/docroot/www/indexfile/Makefile.am b/tests/docroot/www/indexfile/Makefile.am
deleted file mode 100644
index b96fec3d..00000000
--- a/tests/docroot/www/indexfile/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST=index.pl
diff --git a/tests/docroot/www/indexfile/index.pl b/tests/docroot/www/indexfile/index.pl
deleted file mode 100644
index dbf047b9..00000000
--- a/tests/docroot/www/indexfile/index.pl
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/perl
-
-if ($ENV{REDIRECT_STATUS}) {
- print "Status: $ENV{REDIRECT_STATUS}\r\n\r\n$ENV{SCRIPT_NAME}";
- exit 0;
-}
-
-print "Status: 200\r\n\r\n";