1#!/usr/bin/env perl
2BEGIN {
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;
7}
8
9use strict;
10use IO::Socket;
11use Test::More tests => 4;
12use LightyTest;
13
14my $tf = LightyTest->new();
15my $t;
16
17ok($tf->start_proc == 0, "Starting lighttpd") or die();
18
19# mod-cgi
20#
21$t->{REQUEST}  = ( <<EOF
22GET /ssi.shtml HTTP/1.0
23EOF
24 );
25$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "/ssi.shtml\n" } ];
26ok($tf->handle_http($t) == 0, 'ssi - echo ');
27
28
29## bug #280
30$t->{REQUEST}  = ( <<EOF
31GET /exec-date.shtml HTTP/1.0
32EOF
33 );
34$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "2\n\n" } ];
35ok($tf->handle_http($t) == 0, 'ssi - echo ');
36
37
38ok($tf->stop_proc == 0, "Stopping lighttpd");
39
40