summaryrefslogtreecommitdiff
path: root/tests/mod-fastcgi.t
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2009-10-14 17:32:38 +0000
committerStefan Bühler <stbuehler@web.de>2009-10-14 17:32:38 +0000
commit8c83976dbefffaa82ed3cddbee6336f3eb1a60c1 (patch)
treeb47587d41afe644d585be01fa3bba9355fd5f4c6 /tests/mod-fastcgi.t
parent7322d53684c5c9bd3b81d1093b8adc0074d6875f (diff)
downloadlighttpd-git-8c83976dbefffaa82ed3cddbee6336f3eb1a60c1.tar.gz
mod_fastcgi: Add "X-Sendfile2" - supporting multiple ranged files (fixes #2008)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2651 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/mod-fastcgi.t')
-rwxr-xr-xtests/mod-fastcgi.t18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t
index 63c7b152..64cf63da 100755
--- a/tests/mod-fastcgi.t
+++ b/tests/mod-fastcgi.t
@@ -7,7 +7,7 @@ BEGIN {
}
use strict;
-use Test::More tests => 54;
+use Test::More tests => 56;
use LightyTest;
my $tf = LightyTest->new();
@@ -25,7 +25,7 @@ SKIP: {
}
SKIP: {
- skip "no PHP running on port 1026", 31 unless $tf->listening_on(1026);
+ skip "no PHP running on port 1026", 33 unless $tf->listening_on(1026);
ok($tf->start_proc == 0, "Starting lighttpd") or goto cleanup;
@@ -174,6 +174,20 @@ EOF
$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/foo/bar' } ];
ok($tf->handle_http($t) == 0, 'PATH_INFO, check-local off');
+ $t->{REQUEST} = ( <<EOF
+GET /sendfile.php?range=0- HTTP/1.0
+EOF
+ );
+ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Length' => 4348 } ];
+ ok($tf->handle_http($t) == 0, 'X-Sendfile2');
+
+ $t->{REQUEST} = ( <<EOF
+GET /sendfile.php?range=0-4&range2=5- HTTP/1.0
+EOF
+ );
+ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Length' => 4348 } ];
+ ok($tf->handle_http($t) == 0, 'X-Sendfile2');
+
ok($tf->stop_proc == 0, "Stopping lighttpd");