diff options
author | Stefan Bühler <stbuehler@web.de> | 2009-06-11 12:35:00 +0000 |
---|---|---|
committer | Stefan Bühler <stbuehler@web.de> | 2009-06-11 12:35:00 +0000 |
commit | ad1e80e5afc0a3d16c8d820bdaacf491163f8615 (patch) | |
tree | ab5c223d88a3e2766e080c63c1301f6f8fd1bcbb /tests/mod-fastcgi.t | |
parent | 59eaedf353eb1c3e008840bfbb651d714295eeb4 (diff) | |
download | lighttpd-git-ad1e80e5afc0a3d16c8d820bdaacf491163f8615.tar.gz |
Add X-Sendfile-Range feature (fixes #2005)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2531 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/mod-fastcgi.t')
-rwxr-xr-x | tests/mod-fastcgi.t | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t index b5f74d64..8fc35e1d 100755 --- a/tests/mod-fastcgi.t +++ b/tests/mod-fastcgi.t @@ -7,7 +7,7 @@ BEGIN { } use strict; -use Test::More tests => 53; +use Test::More tests => 55; use LightyTest; my $tf = LightyTest->new(); @@ -25,7 +25,7 @@ SKIP: { } SKIP: { - skip "no PHP running on port 1026", 30 unless $tf->listening_on(1026); + skip "no PHP running on port 1026", 32 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 HTTP/1.0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Length' => 4348 } ]; + ok($tf->handle_http($t) == 0, 'X-Sendfile'); + + $t->{REQUEST} = ( <<EOF +GET /sendfile.php?range=3+10 HTTP/1.0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'OCTYPE ' } ]; + ok($tf->handle_http($t) == 0, 'X-Sendfile-Range'); + ok($tf->stop_proc == 0, "Stopping lighttpd"); |