From 7ef569b20421827e3a153431aaecbf1079259c79 Mon Sep 17 00:00:00 2001 From: Christoph Kreutzer Date: Fri, 12 Aug 2016 09:58:48 +0200 Subject: [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 --- tests/mod-fastcgi.t | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'tests/mod-fastcgi.t') 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} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; + ok($tf->handle_http($t) == 0, 'FastCGI - Auth Fail with FastCGI responder afterwards'); + + $t->{REQUEST} = ( <{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"); } -- cgit v1.2.1