Changeset 91

Show
Ignore:
Timestamp:
03/04/2005 01:10:35 PM (3 years ago)
Author:
jan
Message:

check that conditionals and simple-vhost work together

Location:
trunk/tests
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/core-response.t

    r72 r91  
    33use strict; 
    44use IO::Socket; 
    5 use Test::More tests => 8; 
     5use Test::More tests => 10; 
    66 
    77my $basedir = (defined $ENV{'top_builddir'} ? $ENV{'top_builddir'} : '..'); 
     
    208208 
    209209 
     210 
    210211## Low-Level Response-Header Parsing - Content-Length 
    211212 
     
    230231## Low-Level Response-Header Parsing - Location 
    231232 
    232  
    233  
    234233@request  = ( <<EOF 
    235234GET /dummydir HTTP/1.0 
     
    246245ok(handle_http == 0, 'internal redirect in directory + querystring'); 
    247246 
    248  
     247## simple-vhost 
     248 
     249@request  = ( <<EOF 
     250GET /12345.txt HTTP/1.0 
     251Host: no-simple.example.org 
     252EOF 
     253 ); 
     254@response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Length' => '6' } ); 
     255ok(handle_http == 0, 'disabling simple-vhost via conditionals'); 
     256 
     257@request  = ( <<EOF 
     258GET /12345.txt HTTP/1.0 
     259Host: simple.example.org 
     260EOF 
     261 ); 
     262@response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ); 
     263ok(handle_http == 0, 'simple-vhost via conditionals'); 
    249264 
    250265ok(stop_proc == 0, "Stopping lighttpd"); 
  • trunk/tests/lighttpd.conf

    r56 r91  
    135135status.config-url           = "/server-config" 
    136136 
    137 simple-vhost.document-root  = "pages" 
    138 simple-vhost.server-root    = "/tmp/lighttpd/servers/" 
    139 simple-vhost.default-host   = "www.example.org" 
    140  
    141137$HTTP["host"] == "vvv.example.org" { 
    142138  server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/" 
     
    148144} 
    149145 
     146$HTTP["host"] == "no-simple.example.org" { 
     147  server.document-root = "/tmp/lighttpd/servers/123.example.org/pages/" 
     148  server.name = "zzz.example.org" 
     149} 
     150 
     151$HTTP["host"] !~ "(no-simple\.example\.org)" { 
     152  simple-vhost.document-root  = "pages" 
     153  simple-vhost.server-root    = "/tmp/lighttpd/servers/" 
     154  simple-vhost.default-host   = "www.example.org" 
     155} 
     156