summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2008-10-01 20:08:23 +0000
committerStefan Bühler <stbuehler@web.de>2008-10-01 20:08:23 +0000
commit80a4f7a72104a1ede2f3692d14a97dc9c417edea (patch)
treedda204d8cafac73d7f85ec096c2e60d65f54c7ad /tests
parent87eea9e4c32ff33bcd4ec89956a2b11e1d2059fa (diff)
downloadlighttpd-git-80a4f7a72104a1ede2f3692d14a97dc9c417edea.tar.gz
Fix fastcgi authorization in subdirectories with check-local=disabled; don't split pathinfo for authorizer. (#963)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2324 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests')
-rw-r--r--tests/fastcgi-auth.conf1
-rwxr-xr-xtests/mod-fastcgi.t12
2 files changed, 11 insertions, 2 deletions
diff --git a/tests/fastcgi-auth.conf b/tests/fastcgi-auth.conf
index 76b480f1..fadc37c0 100644
--- a/tests/fastcgi-auth.conf
+++ b/tests/fastcgi-auth.conf
@@ -89,6 +89,7 @@ fastcgi.server = ( "/" => (
"bin-path" => env.SRCDIR + "/fcgi-auth",
"mode" => "authorizer",
"docroot" => env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/",
+ "check-local" => "disable",
)
)
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t
index b94d684a..f0ae0b48 100755
--- a/tests/mod-fastcgi.t
+++ b/tests/mod-fastcgi.t
@@ -7,7 +7,7 @@ BEGIN {
}
use strict;
-use Test::More tests => 49;
+use Test::More tests => 50;
use LightyTest;
my $tf = LightyTest->new();
@@ -215,7 +215,7 @@ SKIP: {
}
SKIP: {
- skip "no fcgi-auth found", 4 unless -x $tf->{BASEDIR}."/tests/fcgi-auth" || -x $tf->{BASEDIR}."/tests/fcgi-auth.exe";
+ skip "no fcgi-auth found", 5 unless -x $tf->{BASEDIR}."/tests/fcgi-auth" || -x $tf->{BASEDIR}."/tests/fcgi-auth.exe";
$tf->{CONFIGFILE} = 'fastcgi-auth.conf';
ok($tf->start_proc == 0, "Starting lighttpd with $tf->{CONFIGFILE}") or die();
@@ -235,6 +235,14 @@ EOF
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
ok($tf->handle_http($t) == 0, 'FastCGI - Auth');
+ $t->{REQUEST} = ( <<EOF
+GET /expire/access.txt?ok HTTP/1.0
+Host: www.example.org
+EOF
+ );
+ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ ok($tf->handle_http($t) == 0, 'FastCGI - Auth in subdirectory');
+
ok($tf->stop_proc == 0, "Stopping lighttpd");
}