From 80a4f7a72104a1ede2f3692d14a97dc9c417edea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Wed, 1 Oct 2008 20:08:23 +0000 Subject: 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 --- tests/fastcgi-auth.conf | 1 + tests/mod-fastcgi.t | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'tests') 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} = ( <{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"); } -- cgit v1.2.1