[doc] add ref to RFC 7232 for conditional requests
[lighttpd.git] / tests / mod-simplevhost.t
blob1ff6997505ea1c871779affebe2c5937b2c951bb
1 #!/usr/bin/env perl
2 BEGIN {
3 # add current source dir to the include-path
4 # we need this for make distcheck
5 (my $srcdir = $0) =~ s,/[^/]+$,/,;
6 unshift @INC, $srcdir;
9 use strict;
10 use IO::Socket;
11 use Test::More tests => 4;
12 use LightyTest;
14 my $tf = LightyTest->new();
15 my $t;
17 $tf->{CONFIGFILE} = 'mod-simplevhost.conf';
19 ok($tf->start_proc == 0, "Starting lighttpd") or die();
21 $t->{REQUEST} = ( <<EOF
22 GET /a/a.html HTTP/1.0
23 Host: www.example.org
24 EOF
26 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
27 ok($tf->handle_http($t) == 0, 'Check /a/a.html path');
29 $t->{REQUEST} = ( <<EOF
30 GET /b/b.html HTTP/1.0
31 Host: www.example.org
32 EOF
34 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
35 ok($tf->handle_http($t) == 0, 'Check /b/b.html path');
37 ok($tf->stop_proc == 0, "Stopping lighttpd");