[doc] add mimetype.use-xattr to create-mime.conf.pl
[lighttpd.git] / tests / mod-ssi.t
blobd5d69db7eb4a29341cb237589c245ab02a024367
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 ok($tf->start_proc == 0, "Starting lighttpd") or die();
19 # mod-cgi
21 $t->{REQUEST} = ( <<EOF
22 GET /ssi.shtml HTTP/1.0
23 EOF
25 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "/ssi.shtml\n" } ];
26 ok($tf->handle_http($t) == 0, 'ssi - echo ');
29 ## bug #280
30 $t->{REQUEST} = ( <<EOF
31 GET /exec-date.shtml HTTP/1.0
32 EOF
34 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "2\n\n" } ];
35 ok($tf->handle_http($t) == 0, 'ssi - echo ');
38 ok($tf->stop_proc == 0, "Stopping lighttpd");