--- embedaddon/lighttpd/tests/mod-cgi.t 2013/10/14 10:32:47 1.1.1.1 +++ embedaddon/lighttpd/tests/mod-cgi.t 2016/11/02 10:35:00 1.1.1.2 @@ -8,7 +8,7 @@ BEGIN { use strict; use IO::Socket; -use Test::More tests => 18; +use Test::More tests => 16; use LightyTest; my $tf = LightyTest->new(); @@ -33,6 +33,13 @@ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'H ok($tf->handle_http($t) == 0, 'perl via cgi + pathinfo'); $t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'perl via cgi and internal redirect from CGI'); + +$t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'CGI/1.1' } ]; ok($tf->handle_http($t) == 0, 'cgi-env: GATEWAY_INTERFACE'); -$t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'www.example.org' } ]; -ok($tf->handle_http($t) == 0, 'cgi-env: HTTP_HOST'); - $t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'www.example.org' } ]; -ok($tf->handle_http($t) == 0, 'cgi-env: HTTP_HOST'); - -$t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'www.example.org' } ]; -ok($tf->handle_http($t) == 0, 'cgi-env: HTTP_HOST'); - -$t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Type' => 'text/plain' } ]; +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'www.example.org', 'Content-Type' => 'text/plain' } ]; ok($tf->handle_http($t) == 0, 'cgi-env: HTTP_HOST'); $t->{REQUEST} = ( <