Changeset 479

Show
Ignore:
Timestamp:
07/28/2005 10:24:49 AM (3 years ago)
Author:
jan
Message:

added tests for /prefix + PATH_INFO on check-local = disable

Location:
branches/lighttpd-1.3.x/tests
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-1.3.x/tests/docroot/www/Makefile.am

    r56 r479  
    11EXTRA_DIST=cgi.php cgi.pl dummydir index.html index.txt phpinfo.php \ 
    22           phpself.php redirect.php cgi-pathinfo.pl phphost.php  \ 
    3            nph-status.pl 
     3           nph-status.pl prefix.fcgi 
    44SUBDIRS=go indexfile expire 
  • branches/lighttpd-1.3.x/tests/lighttpd.conf

    r349 r479  
    6868 
    6969fastcgi.debug               = 0 
    70 fastcgi.server              = ( ".php" => (  
    71                                   "grisu" => (  
    72                                     "host" => "127.0.0.1", 
    73                                     "port" => 1026, 
    74 #                                   "mode" => "authorizer", 
    75 #                                   "docroot" => "/tmp/lighttpd/servers/www.example.org/pages/", 
    76                                   ) 
    77                                 ) 
     70fastcgi.server              = ( ".php" =>        ( ( "host" => "127.0.0.1", "port" => 1026 ) ), 
     71                                "/prefix.fcgi" => ( ( "host" => "127.0.0.1", "port" => 1026, "check-local" => "disable", "broken-scriptfilename" => "enable" ) ) 
    7872                              ) 
    7973                 
  • branches/lighttpd-1.3.x/tests/mod-fastcgi.t

    r394 r479  
    88 
    99use strict; 
    10 use Test::More tests => 40; 
     10use Test::More tests => 43; 
    1111use LightyTest; 
    1212 
     
    1616 
    1717SKIP: { 
    18         skip "no PHP running on port 1026", 24 if $tf->pidof("php") == -1;  
     18        skip "no PHP running on port 1026", 27 if $tf->pidof("php") == -1;  
    1919 
    2020        ok($tf->start_proc == 0, "Starting lighttpd") or die(); 
     
    120120        $t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/indexfile/index.php' } ); 
    121121        ok($tf->handle_http($t) == 0, 'PHP_SELF + Indexfile, Bug #3'); 
     122 
     123        $t->{REQUEST}  = ( <<EOF 
     124GET /prefix.fcgi?var=SCRIPT_NAME HTTP/1.0 
     125EOF 
     126 ); 
     127        $t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/prefix.fcgi' } ); 
     128        ok($tf->handle_http($t) == 0, 'PATH_INFO, check-local off'); 
     129 
     130        $t->{REQUEST}  = ( <<EOF 
     131GET /prefix.fcgi/foo/bar?var=SCRIPT_NAME HTTP/1.0 
     132EOF 
     133 ); 
     134        $t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/prefix.fcgi' } ); 
     135        ok($tf->handle_http($t) == 0, 'PATH_INFO, check-local off'); 
     136 
     137        $t->{REQUEST}  = ( <<EOF 
     138GET /prefix.fcgi/foo/bar?var=PATH_INFO HTTP/1.0 
     139EOF 
     140 ); 
     141        $t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/foo/bar' } ); 
     142        ok($tf->handle_http($t) == 0, 'PATH_INFO, check-local off'); 
    122143 
    123144         
  • branches/lighttpd-1.3.x/tests/prepare.sh

    r56 r479  
    2323   $srcdir/docroot/www/*.php \ 
    2424   $srcdir/docroot/www/*.pl \ 
     25   $srcdir/docroot/www/*.fcgi \ 
    2526   $srcdir/docroot/www/*.txt $tmpdir/servers/www.example.org/pages/ 
    2627cp $srcdir/docroot/www/go/*.php $tmpdir/servers/www.example.org/pages/go/