summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2016-05-12 12:11:52 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2016-05-14 01:17:52 -0400
commitdf146a7724e2267d467e68db45db5f89606e3726 (patch)
treedc62babf9733e21b36ac7363cb83c7796dcca41f /tests
parent45021708bf9e3f3adb33c76892184b3f3a2e6d6a (diff)
downloadlighttpd-git-df146a7724e2267d467e68db45db5f89606e3726.tar.gz
[mod_ssi] fix SSI statement parser
bug introduced in 8e3c6bf7 when statement parser was replaced
Diffstat (limited to 'tests')
-rw-r--r--tests/docroot/www/ssi-include.shtml2
-rw-r--r--tests/docroot/www/ssi-include.txt1
-rwxr-xr-xtests/mod-ssi.t12
3 files changed, 12 insertions, 3 deletions
diff --git a/tests/docroot/www/ssi-include.shtml b/tests/docroot/www/ssi-include.shtml
new file mode 100644
index 00000000..fb65ef20
--- /dev/null
+++ b/tests/docroot/www/ssi-include.shtml
@@ -0,0 +1,2 @@
+<!--#include virtual="ssi-include.txt" -->
+<!--#include file="ssi-include.txt" -->
diff --git a/tests/docroot/www/ssi-include.txt b/tests/docroot/www/ssi-include.txt
new file mode 100644
index 00000000..3ea09a82
--- /dev/null
+++ b/tests/docroot/www/ssi-include.txt
@@ -0,0 +1 @@
+ssi-include
diff --git a/tests/mod-ssi.t b/tests/mod-ssi.t
index d5d69db7..a6f1e7b2 100755
--- a/tests/mod-ssi.t
+++ b/tests/mod-ssi.t
@@ -8,7 +8,7 @@ BEGIN {
use strict;
use IO::Socket;
-use Test::More tests => 4;
+use Test::More tests => 5;
use LightyTest;
my $tf = LightyTest->new();
@@ -16,8 +16,6 @@ my $t;
ok($tf->start_proc == 0, "Starting lighttpd") or die();
-# mod-cgi
-#
$t->{REQUEST} = ( <<EOF
GET /ssi.shtml HTTP/1.0
EOF
@@ -35,5 +33,13 @@ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-
ok($tf->handle_http($t) == 0, 'ssi - echo ');
+$t->{REQUEST} = ( <<EOF
+GET /ssi-include.shtml HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "ssi-include\n\nssi-include\n\n" } ];
+ok($tf->handle_http($t) == 0, 'ssi - include');
+
+
ok($tf->stop_proc == 0, "Stopping lighttpd");