summaryrefslogtreecommitdiff
path: root/tests/mod-fastcgi.t
diff options
context:
space:
mode:
authorChristoph Kreutzer <ckreutzer@jessie.zoe.ck-ws.net>2016-08-12 09:58:48 +0200
committerGlenn Strauss <gstrauss@gluelogic.com>2016-09-19 20:02:02 -0400
commit7ef569b20421827e3a153431aaecbf1079259c79 (patch)
treed209a4ecacf5eb958ef3490679fce0095a23d1e6 /tests/mod-fastcgi.t
parent2dcfe1733ec729af0fa3477e91617ce60bc5ecad (diff)
downloadlighttpd-git-7ef569b20421827e3a153431aaecbf1079259c79.tar.gz
[tests] test coverage for issues (#321, #322)
FastCGI Authorizer support with FastCGI Responders x-ref: "mod_fastcgi authorizers cannot protect fastcgi responders" http://redmine.lighttpd.net/issues/321 x-ref: "FastCGI Authorizer support for Variable-name variable passing" http://redmine.lighttpd.net/issues/322
Diffstat (limited to 'tests/mod-fastcgi.t')
-rwxr-xr-xtests/mod-fastcgi.t19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t
index 4efce3fe..1a2219cf 100755
--- a/tests/mod-fastcgi.t
+++ b/tests/mod-fastcgi.t
@@ -7,7 +7,7 @@ BEGIN {
}
use strict;
-use Test::More tests => 58;
+use Test::More tests => 60;
use LightyTest;
my $tf = LightyTest->new();
@@ -292,6 +292,23 @@ EOF
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
ok($tf->handle_http($t) == 0, 'FastCGI - Auth in subdirectory');
+ $t->{REQUEST} = ( <<EOF
+GET /index.fcgi?varfail HTTP/1.0
+Host: www.example.org
+EOF
+ );
+ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
+ ok($tf->handle_http($t) == 0, 'FastCGI - Auth Fail with FastCGI responder afterwards');
+
+ $t->{REQUEST} = ( <<EOF
+GET /index.fcgi?var HTTP/1.0
+Host: www.example.org
+EOF
+ );
+ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'LighttpdTestContent' } ];
+ ok($tf->handle_http($t) == 0, 'FastCGI - Auth Success with Variable- to Env expansion');
+
+
ok($tf->stop_proc == 0, "Stopping lighttpd");
}