diff options
author | Christoph Kreutzer <ckreutzer@jessie.zoe.ck-ws.net> | 2016-08-12 09:58:48 +0200 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2016-09-19 20:02:02 -0400 |
commit | 7ef569b20421827e3a153431aaecbf1079259c79 (patch) | |
tree | d209a4ecacf5eb958ef3490679fce0095a23d1e6 /tests/mod-fastcgi.t | |
parent | 2dcfe1733ec729af0fa3477e91617ce60bc5ecad (diff) | |
download | lighttpd-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-x | tests/mod-fastcgi.t | 19 |
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"); } |