You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2008/07/22 06:35:46 UTC
svn commit: r678637 [43/46] - in
/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd: ./
autom4te.cache/ cygwin/ doc/ openwrt/ src/ tests/ tests/docroot/
tests/docroot/123/ tests/docroot/www/ tests/docroot/www/dummydir/
tests/docroot/www/expire/ ...
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/LightyTest.pm
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/LightyTest.pm?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/LightyTest.pm (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/LightyTest.pm Mon Jul 21 21:35:35 2008
@@ -0,0 +1,308 @@
+#! /usr/bin/perl -w
+
+package LightyTest;
+use strict;
+use IO::Socket;
+use Test::More;
+use Socket;
+use Cwd 'abs_path';
+
+sub mtime {
+ my $file = shift;
+ my @stat = stat $file;
+ return @stat ? $stat[9] : 0;
+}
+sub new {
+ my $class = shift;
+ my $self = {};
+ my $lpath;
+
+ $self->{CONFIGFILE} = 'lighttpd.conf';
+
+ $lpath = (defined $ENV{'top_builddir'} ? $ENV{'top_builddir'} : '..');
+ $self->{BASEDIR} = abs_path($lpath);
+
+ $lpath = (defined $ENV{'top_builddir'} ? $ENV{'top_builddir'}."/tests/" : '.');
+ $self->{TESTDIR} = abs_path($lpath);
+
+ $lpath = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.');
+ $self->{SRCDIR} = abs_path($lpath);
+
+
+ if (mtime($self->{BASEDIR}.'/src/lighttpd') > mtime($self->{BASEDIR}.'/build/lighttpd')) {
+ $self->{LIGHTTPD_PATH} = $self->{BASEDIR}.'/src/lighttpd';
+ $self->{MODULES_PATH} = $self->{BASEDIR}.'/src/.libs';
+ } else {
+ $self->{LIGHTTPD_PATH} = $self->{BASEDIR}.'/build/lighttpd';
+ $self->{MODULES_PATH} = $self->{BASEDIR}.'/build';
+ }
+ $self->{LIGHTTPD_PIDFILE} = $self->{TESTDIR}.'/tmp/lighttpd/lighttpd.pid';
+ $self->{PIDOF_PIDFILE} = $self->{TESTDIR}.'/tmp/lighttpd/pidof.pid';
+ $self->{PORT} = 2048;
+
+ my ($name, $aliases, $addrtype, $net) = gethostbyaddr(inet_aton("127.0.0.1"), AF_INET);
+
+ $self->{HOSTNAME} = $name;
+
+ bless($self, $class);
+
+ return $self;
+}
+
+sub listening_on {
+ my $self = shift;
+ my $port = shift;
+
+ my $remote =
+ IO::Socket::INET->new(Proto => "tcp",
+ PeerAddr => "127.0.0.1",
+ PeerPort => $port) or return 0;
+
+ close $remote;
+
+ return 1;
+}
+
+sub stop_proc {
+ my $self = shift;
+
+ open F, $self->{LIGHTTPD_PIDFILE} or return -1;
+ my $pid = <F>;
+ close F;
+
+ if (defined $pid) {
+ kill('TERM',$pid) or return -1;
+ select(undef, undef, undef, 0.1);
+ }
+
+ return 0;
+}
+
+
+sub start_proc {
+ my $self = shift;
+ # kill old proc if necessary
+ $self->stop_proc;
+
+ # pre-process configfile if necessary
+ #
+
+ $ENV{'SRCDIR'} = $self->{BASEDIR}.'/tests';
+
+ unlink($self->{LIGHTTPD_PIDFILE});
+ if (defined $ENV{"TRACEME"} && $ENV{"TRACEME"} eq 'strace') {
+ system("strace -tt -s 512 -o strace ".$self->{LIGHTTPD_PATH}." -D -f ".$self->{SRCDIR}."/".$self->{CONFIGFILE}." -m ".$self->{MODULES_PATH}." &");
+ } elsif (defined $ENV{"TRACEME"} && $ENV{"TRACEME"} eq 'truss') {
+ system("/usr/dtrctkit/bin/dtruss -d -e ".$self->{LIGHTTPD_PATH}." -D -f ".$self->{SRCDIR}."/".$self->{CONFIGFILE}." -m ".$self->{MODULES_PATH}." 2> strace &");
+ } elsif (defined $ENV{"TRACEME"} && $ENV{"TRACEME"} eq 'valgrind') {
+ system("valgrind --tool=memcheck --show-reachable=yes --leak-check=yes --log-file=valgrind ".$self->{LIGHTTPD_PATH}." -D -f ".$self->{SRCDIR}."/".$self->{CONFIGFILE}." -m ".$self->{MODULES_PATH}." &");
+ } else {
+ system($self->{LIGHTTPD_PATH}." -f ".$self->{SRCDIR}."/".$self->{CONFIGFILE}." -m ".$self->{MODULES_PATH});
+ }
+
+ select(undef, undef, undef, 0.1);
+ if (not -e $self->{LIGHTTPD_PIDFILE} or 0 == kill 0, `cat $self->{LIGHTTPD_PIDFILE}`) {
+ select(undef, undef, undef, 2);
+ }
+
+ unlink($self->{TESTDIR}."/tmp/cfg.file");
+
+ # no pidfile, we failed
+ if (not -e $self->{LIGHTTPD_PIDFILE}) {
+ diag(sprintf('Could not find pidfile: %s', $self->{LIGHTTPD_PIDFILE}));
+ return -1;
+ }
+
+ # the process is gone, we failed
+ if (0 == kill 0, `cat $self->{LIGHTTPD_PIDFILE}`) {
+ diag(sprintf('the process referenced by %s is not up', $self->{LIGHTTPD_PIDFILE}));
+ return -1;
+ }
+
+ 0;
+}
+
+sub handle_http {
+ my $self = shift;
+ my $t = shift;
+ my $EOL = "\015\012";
+ my $BLANK = $EOL x 2;
+ my $host = "127.0.0.1";
+
+ my @request = $t->{REQUEST};
+ my @response = $t->{RESPONSE};
+
+ my $remote =
+ IO::Socket::INET->new(Proto => "tcp",
+ PeerAddr => $host,
+ PeerPort => $self->{PORT});
+
+ if (not defined $remote) {
+ diag("connect failed: $!");
+ return -1;
+ }
+
+ $remote->autoflush(1);
+
+ foreach(@request) {
+ # pipeline requests
+ s/\r//g;
+ s/\n/$EOL/g;
+
+ print $remote $_.$BLANK;
+ }
+
+ my $lines = "";
+
+ # read everything
+ while(<$remote>) {
+ $lines .= $_;
+ }
+
+ close $remote;
+
+ my $full_response = $lines;
+
+ my $href;
+ foreach $href ( @{ $t->{RESPONSE} }) {
+ # first line is always response header
+ my %resp_hdr;
+ my $resp_body;
+ my $resp_line;
+ my $conditions = $_;
+
+ for (my $ln = 0; defined $lines; $ln++) {
+ (my $line, $lines) = split($EOL, $lines, 2);
+
+ # header finished
+ last if(length($line) == 0);
+
+ if ($ln == 0) {
+ # response header
+ $resp_line = $line;
+ } else {
+ # response vars
+
+ if ($line =~ /^([^:]+):\s*(.+)$/) {
+ (my $h = $1) =~ tr/[A-Z]/[a-z]/;
+
+ if (defined $resp_hdr{$h}) {
+ diag(sprintf("header %s is duplicated: %s and %s\n",
+ $h, $resp_hdr{$h}, $2));
+ } else {
+ $resp_hdr{$h} = $2;
+ }
+ } else {
+ diag(sprintf("unexpected line '$line'\n"));
+ return -1;
+ }
+ }
+ }
+
+ $t->{etag} = $resp_hdr{'etag'};
+ $t->{date} = $resp_hdr{'date'};
+
+ # check length
+ if (defined $resp_hdr{"content-length"}) {
+ $resp_body = substr($lines, 0, $resp_hdr{"content-length"});
+ if (length($lines) < $resp_hdr{"content-length"}) {
+ $lines = "";
+ } else {
+ $lines = substr($lines, $resp_hdr{"content-length"});
+ }
+ undef $lines if (length($lines) == 0);
+ } else {
+ $resp_body = $lines;
+ undef $lines;
+ }
+
+ # check conditions
+ if ($resp_line =~ /^(HTTP\/1\.[01]) ([0-9]{3}) .+$/) {
+ if ($href->{'HTTP-Protocol'} ne $1) {
+ diag(sprintf("proto failed: expected '%s', got '%s'\n", $href->{'HTTP-Protocol'}, $1));
+ return -1;
+ }
+ if ($href->{'HTTP-Status'} ne $2) {
+ diag(sprintf("status failed: expected '%s', got '%s'\n", $href->{'HTTP-Status'}, $2));
+ return -1;
+ }
+ } else {
+ diag(sprintf("unexpected resp_line '$resp_line'\n"));
+ return -1;
+ }
+
+ if (defined $href->{'HTTP-Content'}) {
+ $resp_body = "" unless defined $resp_body;
+ if ($href->{'HTTP-Content'} ne $resp_body) {
+ diag(sprintf("body failed: expected '%s', got '%s'\n", $href->{'HTTP-Content'}, $resp_body));
+ return -1;
+ }
+ } elsif (defined $href->{'-HTTP-Content'}) {
+ if (defined $resp_body && $resp_body ne '') {
+ diag(sprintf("body failed: expected empty body, got '%s'\n", $resp_body));
+ return -1;
+ }
+ }
+
+ foreach (keys %{ $href }) {
+ ## filter special keys
+ next if $_ eq 'HTTP-Protocol';
+ next if $_ eq 'HTTP-Status';
+ next if $_ eq 'HTTP-Content';
+ next if $_ eq '-HTTP-Content';
+
+ (my $k = $_) =~ tr/[A-Z]/[a-z]/;
+
+ my $verify_value = 1;
+ my $key_inverted = 0;
+
+ if (substr($k, 0, 1) eq '+') {
+ ## the key has to exist, but the value is ignored
+ $k = substr($k, 1);
+ $verify_value = 0;
+ } elsif (substr($k, 0, 1) eq '-') {
+ ## the key should NOT exist
+ $k = substr($k, 1);
+ $key_inverted = 1;
+ $verify_value = 0; ## skip the value check
+ }
+
+ if ($key_inverted) {
+ if (defined $resp_hdr{$k}) {
+ diag(sprintf("required header '%s' is missing\n", $k));
+ return -1;
+ }
+ } else {
+ if (not defined $resp_hdr{$k}) {
+ diag(sprintf("required header '%s' is missing\n", $k));
+ return -1;
+ }
+ }
+
+ if ($verify_value) {
+ if ($href->{$_} =~ /^\/(.+)\/$/) {
+ if ($resp_hdr{$k} !~ /$1/) {
+ diag(sprintf("response-header failed: expected '%s', got '%s', regex: %s\n",
+ $href->{$_}, $resp_hdr{$k}, $1));
+ return -1;
+ }
+ } elsif ($href->{$_} ne $resp_hdr{$k}) {
+ diag(sprintf("response-header failed: expected '%s', got '%s'\n",
+ $href->{$_}, $resp_hdr{$k}));
+ return -1;
+ }
+ }
+ }
+ }
+
+ # we should have sucked up everything
+ if (defined $lines) {
+ diag(sprintf("unexpected lines '$lines'\n"));
+ return -1;
+ }
+
+ return 0;
+}
+
+1;
+
Propchange: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/LightyTest.pm
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/Makefile.am?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/Makefile.am (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/Makefile.am Mon Jul 21 21:35:35 2008
@@ -0,0 +1,76 @@
+# lighttpd.conf and conformance.pl expect this directory
+testdir=$(srcdir)/tmp/lighttpd/
+
+if CHECK_WITH_FASTCGI
+check_PROGRAMS=fcgi-auth fcgi-responder
+
+fcgi_auth_SOURCES=fcgi-auth.c
+fcgi_auth_LDADD=-lfcgi
+
+fcgi_responder_SOURCES=fcgi-responder.c
+fcgi_responder_LDADD=-lfcgi
+endif
+
+TESTS=\
+ prepare.sh \
+ run-tests.pl \
+ cleanup.sh
+
+CONFS=fastcgi-10.conf \
+ fastcgi-auth.conf \
+ fastcgi-responder.conf \
+ fastcgi-13.conf \
+ bug-06.conf \
+ bug-12.conf \
+ core-var-include.t \
+ var-include.conf \
+ var-include-sub.conf \
+ condition.conf \
+ core-condition.t \
+ core-request.t \
+ core-response.t \
+ core-keepalive.t \
+ core.t \
+ mod-proxy.t \
+ proxy.conf \
+ mod-secdownload.t \
+ mod-access.t \
+ mod-auth.t \
+ mod-cgi.t \
+ mod-compress.t \
+ mod-fastcgi.t \
+ mod-redirect.t \
+ mod-rewrite.t \
+ mod-userdir.t \
+ env-variables.t \
+ env-variables.conf \
+ symlink.t \
+ request.t \
+ mod-ssi.t \
+ LightyTest.pm \
+ mod-setenv.t \
+ lowercase.t \
+ lowercase.conf \
+ cachable.t \
+ core-404-handler.t \
+ 404-handler.conf
+
+TESTS_ENVIRONMENT=$(srcdir)/wrapper.sh $(srcdir) $(top_builddir)
+
+EXTRA_DIST=wrapper.sh lighttpd.conf \
+ lighttpd.user \
+ lighttpd.htpasswd \
+ SConscript \
+ $(CONFS) \
+ $(TESTS)
+
+SUBDIRS=docroot
+
+leak-check:
+ for i in $(TESTS); do \
+ $(srcdir)/$$i; \
+ echo $$?; \
+ done
+
+clean-local:
+ rm -f *.out
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/Makefile.in
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/Makefile.in?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/Makefile.in (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/Makefile.in Mon Jul 21 21:35:35 2008
@@ -0,0 +1,732 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+@CHECK_WITH_FASTCGI_TRUE@check_PROGRAMS = fcgi-auth$(EXEEXT) \
+@CHECK_WITH_FASTCGI_TRUE@ fcgi-responder$(EXEEXT)
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__fcgi_auth_SOURCES_DIST = fcgi-auth.c
+@CHECK_WITH_FASTCGI_TRUE@am_fcgi_auth_OBJECTS = fcgi-auth.$(OBJEXT)
+fcgi_auth_OBJECTS = $(am_fcgi_auth_OBJECTS)
+fcgi_auth_DEPENDENCIES =
+am__fcgi_responder_SOURCES_DIST = fcgi-responder.c
+@CHECK_WITH_FASTCGI_TRUE@am_fcgi_responder_OBJECTS = \
+@CHECK_WITH_FASTCGI_TRUE@ fcgi-responder.$(OBJEXT)
+fcgi_responder_OBJECTS = $(am_fcgi_responder_OBJECTS)
+fcgi_responder_DEPENDENCIES =
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(fcgi_auth_SOURCES) $(fcgi_responder_SOURCES)
+DIST_SOURCES = $(am__fcgi_auth_SOURCES_DIST) \
+ $(am__fcgi_responder_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+ATTR_LIB = @ATTR_LIB@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXIS2C_INCLUDE = @AXIS2C_INCLUDE@
+AXIS2C_LIBS = @AXIS2C_LIBS@
+BZ_LIB = @BZ_LIB@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_WITH_FASTCGI_FALSE = @CHECK_WITH_FASTCGI_FALSE@
+CHECK_WITH_FASTCGI_TRUE = @CHECK_WITH_FASTCGI_TRUE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CROSS_COMPILING_FALSE = @CROSS_COMPILING_FALSE@
+CROSS_COMPILING_TRUE = @CROSS_COMPILING_TRUE@
+CRYPT_LIB = @CRYPT_LIB@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DL_LIB = @DL_LIB@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FAM_CFLAGS = @FAM_CFLAGS@
+FAM_LIBS = @FAM_LIBS@
+FFLAGS = @FFLAGS@
+GDBM_LIB = @GDBM_LIB@
+GREP = @GREP@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LBER_LIB = @LBER_LIB@
+LDAP_LIB = @LDAP_LIB@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LUA_CFLAGS = @LUA_CFLAGS@
+LUA_LIBS = @LUA_LIBS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MEMCACHE_LIB = @MEMCACHE_LIB@
+MYSQL_CONFIG = @MYSQL_CONFIG@
+MYSQL_INCLUDE = @MYSQL_INCLUDE@
+MYSQL_LIBS = @MYSQL_LIBS@
+NMEDIT = @NMEDIT@
+NO_RDYNAMIC_FALSE = @NO_RDYNAMIC_FALSE@
+NO_RDYNAMIC_TRUE = @NO_RDYNAMIC_TRUE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PCRECONFIG = @PCRECONFIG@
+PCRE_LIB = @PCRE_LIB@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SED = @SED@
+SENDFILE_LIB = @SENDFILE_LIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SQLITE_CFLAGS = @SQLITE_CFLAGS@
+SQLITE_LIBS = @SQLITE_LIBS@
+SSL_LIB = @SSL_LIB@
+STRIP = @STRIP@
+U = @U@
+UUID_LIBS = @UUID_LIBS@
+VERSION = @VERSION@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+Z_LIB = @Z_LIB@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+
+# lighttpd.conf and conformance.pl expect this directory
+testdir = $(srcdir)/tmp/lighttpd/
+@CHECK_WITH_FASTCGI_TRUE@fcgi_auth_SOURCES = fcgi-auth.c
+@CHECK_WITH_FASTCGI_TRUE@fcgi_auth_LDADD = -lfcgi
+@CHECK_WITH_FASTCGI_TRUE@fcgi_responder_SOURCES = fcgi-responder.c
+@CHECK_WITH_FASTCGI_TRUE@fcgi_responder_LDADD = -lfcgi
+TESTS = \
+ prepare.sh \
+ run-tests.pl \
+ cleanup.sh
+
+CONFS = fastcgi-10.conf \
+ fastcgi-auth.conf \
+ fastcgi-responder.conf \
+ fastcgi-13.conf \
+ bug-06.conf \
+ bug-12.conf \
+ core-var-include.t \
+ var-include.conf \
+ var-include-sub.conf \
+ condition.conf \
+ core-condition.t \
+ core-request.t \
+ core-response.t \
+ core-keepalive.t \
+ core.t \
+ mod-proxy.t \
+ proxy.conf \
+ mod-secdownload.t \
+ mod-access.t \
+ mod-auth.t \
+ mod-cgi.t \
+ mod-compress.t \
+ mod-fastcgi.t \
+ mod-redirect.t \
+ mod-rewrite.t \
+ mod-userdir.t \
+ env-variables.t \
+ env-variables.conf \
+ symlink.t \
+ request.t \
+ mod-ssi.t \
+ LightyTest.pm \
+ mod-setenv.t \
+ lowercase.t \
+ lowercase.conf \
+ cachable.t \
+ core-404-handler.t \
+ 404-handler.conf
+
+TESTS_ENVIRONMENT = $(srcdir)/wrapper.sh $(srcdir) $(top_builddir)
+EXTRA_DIST = wrapper.sh lighttpd.conf \
+ lighttpd.user \
+ lighttpd.htpasswd \
+ SConscript \
+ $(CONFS) \
+ $(TESTS)
+
+SUBDIRS = docroot
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+fcgi-auth$(EXEEXT): $(fcgi_auth_OBJECTS) $(fcgi_auth_DEPENDENCIES)
+ @rm -f fcgi-auth$(EXEEXT)
+ $(LINK) $(fcgi_auth_LDFLAGS) $(fcgi_auth_OBJECTS) $(fcgi_auth_LDADD) $(LIBS)
+fcgi-responder$(EXEEXT): $(fcgi_responder_OBJECTS) $(fcgi_responder_DEPENDENCIES)
+ @rm -f fcgi-responder$(EXEEXT)
+ $(LINK) $(fcgi_responder_LDFLAGS) $(fcgi_responder_OBJECTS) $(fcgi_responder_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcgi-auth.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcgi-responder.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list='$(TESTS)'; \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ echo "XPASS: $$tst"; \
+ ;; \
+ *) \
+ echo "PASS: $$tst"; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *" $$tst "*) \
+ xfail=`expr $$xfail + 1`; \
+ echo "XFAIL: $$tst"; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ echo "FAIL: $$tst"; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ echo "SKIP: $$tst"; \
+ fi; \
+ done; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="All $$all tests passed"; \
+ else \
+ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all tests failed"; \
+ else \
+ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ skipped="($$skip tests were not run)"; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ test -z "$$skipped" || echo "$$skipped"; \
+ test -z "$$report" || echo "$$report"; \
+ echo "$$dashes"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-TESTS \
+ check-am clean clean-checkPROGRAMS clean-generic clean-libtool \
+ clean-local clean-recursive ctags ctags-recursive distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-recursive distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am uninstall-info-am
+
+
+leak-check:
+ for i in $(TESTS); do \
+ $(srcdir)/$$i; \
+ echo $$?; \
+ done
+
+clean-local:
+ rm -f *.out
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/SConscript
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/SConscript?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/SConscript (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/SConscript Mon Jul 21 21:35:35 2008
@@ -0,0 +1,45 @@
+Import('env')
+
+tests = Split('prepare.sh \
+ run-tests.pl \
+ cleanup.sh')
+
+extra_dist = Split('fastcgi-10.conf \
+ fastcgi-auth.conf \
+ fastcgi-responder.conf \
+ fastcgi-13.conf \
+ bug-06.conf \
+ bug-12.conf \
+ core-var-include.t \
+ var-include.conf \
+ var-include-sub.conf \
+ condition.conf \
+ core-condition.t \
+ core-request.t \
+ core-response.t \
+ core-keepalive.t \
+ core.t \
+ mod-access.t \
+ mod-auth.t \
+ mod-cgi.t \
+ mod-compress.t \
+ mod-fastcgi.t \
+ mod-redirect.t \
+ mod-userdir.t \
+ mod-rewrite.t \
+ request.t \
+ mod-ssi.t \
+ LightyTest.pm \
+ mod-setenv.t')
+
+t = env.Command('foo1', 'prepare.sh', '(cd ./tests/; ./prepare.sh; cd ..)')
+t += env.Command('foo2', 'run-tests.pl', '( cd ./tests/; SHELL=/bin/sh ./run-tests.pl; cd ..)')
+t += env.Command('foo3', 'cleanup.sh', '(cd ./tests/; ./cleanup.sh; cd ..)')
+
+if env['LIBFCGI']:
+ fcgis = []
+ fcgis += env.Program("fcgi-auth", "fcgi-auth.c", LIBS=env['LIBFCGI'])
+ fcgis += env.Program("fcgi-responder", "fcgi-responder.c", LIBS=env['LIBFCGI'])
+ env.Depends(t, fcgis)
+
+env.Alias('check', t )
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/bug-06.conf
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/bug-06.conf?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/bug-06.conf (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/bug-06.conf Mon Jul 21 21:35:35 2008
@@ -0,0 +1,163 @@
+server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+server.pid-file = env.SRCDIR + "/tmp/lighttpd/lighttpd.pid"
+
+## bind to port (default: 80)
+server.port = 2048
+
+# server.license = "00000001000000013feccb804014587f000000010000000105911c976a3d462c8eaa2d7ca850432c"
+
+## bind to localhost (default: all interfaces)
+server.bind = "localhost"
+server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
+server.name = "www.example.org"
+server.tag = "Apache 1.3.29"
+
+
+##
+## Format: <errorfile-prefix><status>.html
+## -> ..../status-404.html for 'File not found'
+#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
+
+server.dir-listing = "enable"
+
+#server.event-handler = "linux-sysepoll"
+#server.event-handler = "linux-rtsig"
+
+#server.modules.path = ""
+server.modules = (
+ "mod_rewrite",
+ "mod_setenv",
+ "mod_access",
+ "mod_auth",
+# "mod_httptls",
+ "mod_status",
+ "mod_expire",
+ "mod_simple_vhost",
+ "mod_redirect",
+# "mod_evhost",
+# "mod_localizer",
+ "mod_fastcgi",
+ "mod_cgi",
+ "mod_compress",
+ "mod_accesslog" )
+
+server.indexfiles = ( "index.html",
+ "index.htm", "default.htm", "index.php" )
+
+#,-- only root can use these options
+#|
+#|# chroot() to directory (default: no chroot() )
+#| server.chroot /
+#|# change uid to <uid> (default: don't care)
+#| server.userid wwwrun
+#|# change uid to <uid> (default: don't care)
+#| server.groupid wwwrun
+#|
+#`--
+
+
+######################## MODULE CONFIG ############################
+
+
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+
+mimetype.assign = ( ".png" => "image/png",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".gif" => "image/gif",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".pdf" => "application/pdf",
+ ".swf" => "application/x-shockwave-flash",
+ ".spl" => "application/futuresplash",
+ ".txt" => "text/plain",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".gz" => "application/x-gzip",
+ ".c" => "text/plain",
+ ".conf" => "text/plain" )
+
+compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
+compress.filetype = ("text/plain", "text/html")
+
+setenv.add-environment = ( "TRAC_ENV" => "foo")
+setenv.add-request-header = ( "FOO" => "foo")
+setenv.add-response-header = ( "BAR" => "foo")
+
+fastcgi.debug = 0
+fastcgi.server = ( ".php" => (
+ "grisu" => (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+# "mode" => "authorizer",
+# "docroot" => env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/",
+ )
+ )
+ )
+
+
+cgi.assign = ( ".pl" => "/usr/bin/perl",
+ ".cgi" => "/usr/bin/perl",
+ ".py" => "/usr/bin/python" )
+
+
+
+ssl.engine = "disable"
+ssl.pemfile = "server.pem"
+
+auth.backend = "plain"
+auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
+auth.backend.plain.groupfile = "lighttpd.group"
+
+auth.backend.ldap.hostname = "localhost"
+auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
+auth.backend.ldap.filter = "(uid=$)"
+
+auth.require = ( "/server-status" =>
+ (
+ "method" => "digest",
+ "realm" => "download archiv",
+# "require" => ("group=www", "user=jan", "host=192.168.2.10")
+ "require" => "group=www|user=jan|host=192.168.2.10"
+ ),
+ "/auth.php" =>
+ (
+ "method" => "basic",
+ "realm" => "download archiv",
+# "require" => ("group=www", "user=jan", "host=192.168.2.10")
+ "require" => "user=jan"
+ ),
+ "/server-config" =>
+ (
+ "method" => "basic",
+ "realm" => "download archiv",
+# "require" => ("group=www", "user=jan", "user=weigon", "host=192.168.2.10")
+ "require" => "group=www|user=jan|host=192.168.2.10"
+ )
+ )
+
+url.access-deny = ( "~", ".inc")
+
+url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
+
+expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
+
+#cache.cache-dir = "/home/weigon/wwwroot/cache/"
+
+#### status module
+status.status-url = "/server-status"
+status.config-url = "/server-config"
+
+simple-vhost.document-root = "pages"
+simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
+simple-vhost.default-host = "www.example.org"
+
+$HTTP["host"] == "vvv.example.org" {
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+}
+
+$HTTP["host"] == "zzz.example.org" {
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "zzz.example.org"
+}
+
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/bug-12.conf
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/bug-12.conf?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/bug-12.conf (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/bug-12.conf Mon Jul 21 21:35:35 2008
@@ -0,0 +1,165 @@
+server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+server.pid-file = env.SRCDIR + "/tmp/lighttpd/lighttpd.pid"
+
+## bind to port (default: 80)
+server.port = 2048
+
+# server.license = "00000001000000013feccb804014587f000000010000000105911c976a3d462c8eaa2d7ca850432c"
+
+## bind to localhost (default: all interfaces)
+server.bind = "localhost"
+server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
+server.name = "www.example.org"
+server.tag = "Apache 1.3.29"
+
+
+##
+## Format: <errorfile-prefix><status>.html
+## -> ..../status-404.html for 'File not found'
+#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
+
+server.dir-listing = "enable"
+
+#server.event-handler = "linux-sysepoll"
+#server.event-handler = "linux-rtsig"
+
+#server.modules.path = ""
+server.modules = (
+ "mod_rewrite",
+ "mod_setenv",
+ "mod_access",
+ "mod_auth",
+# "mod_httptls",
+ "mod_status",
+ "mod_expire",
+ "mod_simple_vhost",
+ "mod_redirect",
+# "mod_evhost",
+# "mod_localizer",
+ "mod_fastcgi",
+ "mod_cgi",
+ "mod_compress",
+ "mod_accesslog" )
+
+server.indexfiles = ( "index.html",
+ "index.htm", "default.htm", "index.php" )
+
+server.error-handler-404 = "/indexfile/return-404.php"
+
+#,-- only root can use these options
+#|
+#|# chroot() to directory (default: no chroot() )
+#| server.chroot /
+#|# change uid to <uid> (default: don't care)
+#| server.userid wwwrun
+#|# change uid to <uid> (default: don't care)
+#| server.groupid wwwrun
+#|
+#`--
+
+
+######################## MODULE CONFIG ############################
+
+
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+
+mimetype.assign = ( ".png" => "image/png",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".gif" => "image/gif",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".pdf" => "application/pdf",
+ ".swf" => "application/x-shockwave-flash",
+ ".spl" => "application/futuresplash",
+ ".txt" => "text/plain",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".gz" => "application/x-gzip",
+ ".c" => "text/plain",
+ ".conf" => "text/plain" )
+
+compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
+compress.filetype = ("text/plain", "text/html")
+
+setenv.add-environment = ( "TRAC_ENV" => "foo")
+setenv.add-request-header = ( "FOO" => "foo")
+setenv.add-response-header = ( "BAR" => "foo")
+
+fastcgi.debug = 0
+fastcgi.server = ( ".php" => (
+ "grisu" => (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+# "mode" => "authorizer",
+# "docroot" => env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/",
+ )
+ )
+ )
+
+
+cgi.assign = ( ".pl" => "/usr/bin/perl",
+ ".cgi" => "/usr/bin/perl",
+ ".py" => "/usr/bin/python" )
+
+
+
+ssl.engine = "disable"
+ssl.pemfile = "server.pem"
+
+auth.backend = "plain"
+auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
+auth.backend.plain.groupfile = "lighttpd.group"
+
+auth.backend.ldap.hostname = "localhost"
+auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
+auth.backend.ldap.filter = "(uid=$)"
+
+auth.require = ( "/server-status" =>
+ (
+ "method" => "digest",
+ "realm" => "download archiv",
+# "require" => ("group=www", "user=jan", "host=192.168.2.10")
+ "require" => "group=www|user=jan|host=192.168.2.10"
+ ),
+ "/auth.php" =>
+ (
+ "method" => "basic",
+ "realm" => "download archiv",
+# "require" => ("group=www", "user=jan", "host=192.168.2.10")
+ "require" => "user=jan"
+ ),
+ "/server-config" =>
+ (
+ "method" => "basic",
+ "realm" => "download archiv",
+# "require" => ("group=www", "user=jan", "user=weigon", "host=192.168.2.10")
+ "require" => "group=www|user=jan|host=192.168.2.10"
+ )
+ )
+
+url.access-deny = ( "~", ".inc")
+
+url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
+
+expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
+
+#cache.cache-dir = "/home/weigon/wwwroot/cache/"
+
+#### status module
+status.status-url = "/server-status"
+status.config-url = "/server-config"
+
+simple-vhost.document-root = "pages"
+simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
+simple-vhost.default-host = "www.example.org"
+
+$HTTP["host"] == "vvv.example.org" {
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+}
+
+$HTTP["host"] == "zzz.example.org" {
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "zzz.example.org"
+}
+
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/cachable.t
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/cachable.t?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/cachable.t (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/cachable.t Mon Jul 21 21:35:35 2008
@@ -0,0 +1,121 @@
+#!/usr/bin/env perl
+BEGIN {
+ # add current source dir to the include-path
+ # we need this for make distcheck
+ (my $srcdir = $0) =~ s,/[^/]+$,/,;
+ unshift @INC, $srcdir;
+}
+
+use strict;
+use IO::Socket;
+use Test::More tests => 13;
+use LightyTest;
+
+my $tf = LightyTest->new();
+my $t;
+
+$tf->{CONFIGFILE} = 'lighttpd.conf';
+
+ok($tf->start_proc == 0, "Starting lighttpd") or die();
+
+## check if If-Modified-Since, If-None-Match works
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+If-Modified-Since: Sun, 01 Jan 1970 00:00:01 GMT
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - old If-Modified-Since');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+If-Modified-Since: Sun, 01 Jan 1970 00:00:01 GMT; foo
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Last-Modified' => ''} ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - old If-Modified-Since, comment');
+
+my $now = $t->{date};
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+If-Modified-Since: $now
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - new If-Modified-Since');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+If-Modified-Since: $now; foo
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - new If-Modified-Since, comment');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+If-None-Match: foo
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+ETag' => ''} ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - old If-None-Match');
+
+my $etag = $t->{etag};
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+If-None-Match: $etag
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - old If-None-Match');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+If-None-Match: $etag
+If-Modified-Since: Sun, 01 Jan 1970 00:00:01 GMT; foo
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - ETag + old Last-Modified');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+If-None-Match: $etag
+If-Modified-Since: $now; foo
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - ETag, Last-Modified + comment');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+If-None-Match: Foo
+If-Modified-Since: Sun, 01 Jan 1970 00:00:01 GMT; foo
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - old ETAG + old Last-Modified');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+If-None-Match: $etag
+If-Modified-Since: $now foo
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 412 } ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - ETag + Last-Modified + overlong timestamp');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+If-None-Match: $etag
+Host: etag.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'Conditional GET - ETag + disabled etags on server side');
+
+ok($tf->stop_proc == 0, "Stopping lighttpd");
+
Propchange: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/cachable.t
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/cleanup.sh
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/cleanup.sh?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/cleanup.sh (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/cleanup.sh Mon Jul 21 21:35:35 2008
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if test x$srcdir = x; then
+ srcdir=.
+fi
+
+tmpdir=$top_builddir/tests/tmp/
+
+# remove test-framework
+rm -rf $tmpdir
+
+printf "%-40s" "cleaning up"
+
+exit 0
Propchange: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/cleanup.sh
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/condition.conf
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/condition.conf?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/condition.conf (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/condition.conf Mon Jul 21 21:35:35 2008
@@ -0,0 +1,59 @@
+
+debug.log-request-handling = "enable"
+debug.log-condition-handling = "enable"
+
+server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+server.pid-file = env.SRCDIR + "/tmp/lighttpd/lighttpd.pid"
+
+## bind to port (default: 80)
+server.port = 2048
+
+## bind to localhost (default: all interfaces)
+server.bind = "localhost"
+server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
+server.name = "www.example.org"
+server.tag = "Apache 1.3.29"
+
+
+server.modules = (
+ "mod_redirect",
+ "mod_accesslog" )
+
+######################## MODULE CONFIG ############################
+
+
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+
+mimetype.assign = ( ".html" => "text/html" )
+
+url.redirect = ("^" => "/default")
+
+$HTTP["host"] == "www.example.org" {
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "www.example.org"
+ url.redirect = ("^" => "/match_1")
+}
+else $HTTP["host"] == "test1.example.org" {
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "test1.example.org"
+ url.redirect = ("^" => "/match_2")
+}
+# comments
+else $HTTP["host"] == "test2.example.org" {
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "test2.example.org"
+ url.redirect = ("^" => "/match_3")
+}
+
+ # comments
+
+else $HTTP["host"] == "test3.example.org" {
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "test3.example.org"
+ url.redirect = ("^" => "/match_4")
+
+ # comments
+ $HTTP["url"] == "/index.html" {
+ url.redirect = ("^" => "/match_5")
+ }
+}
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-404-handler.t
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-404-handler.t?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-404-handler.t (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-404-handler.t Mon Jul 21 21:35:35 2008
@@ -0,0 +1,76 @@
+#!/usr/bin/env perl
+#
+# combinations we have to test:
+# plain 404 case
+# 404-handler -> static file (verify content)
+# 404-handler -> fastcgi
+# returning 200
+# returning 302 + Location
+# returning 404
+# returning no status -> 200
+#
+BEGIN {
+ # add current source dir to the include-path
+ # we need this for make distcheck
+ (my $srcdir = $0) =~ s,/[^/]+$,/,;
+ unshift @INC, $srcdir;
+}
+
+use strict;
+use IO::Socket;
+use Test::More tests => 8;
+use LightyTest;
+
+my $tf = LightyTest->new();
+my $t;
+$tf->{CONFIGFILE} = '404-handler.conf';
+
+ok($tf->start_proc == 0, "Starting lighttpd") or die();
+
+$t->{REQUEST} = ( <<EOF
+GET /static/notfound HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "static not found\n" } ];
+ok($tf->handle_http($t) == 0, '404 handler => static');
+
+#
+#
+#
+$t->{REQUEST} = ( <<EOF
+GET /dynamic/200/notfound HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "found here\n" } ];
+ok($tf->handle_http($t) == 0, '404 handler => dynamic(200)');
+
+$t->{REQUEST} = ( <<EOF
+GET /dynamic/302/notfound HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 302, 'Location' => "http://www.example.org/" } ];
+ok($tf->handle_http($t) == 0, '404 handler => dynamic(302)');
+
+$t->{REQUEST} = ( <<EOF
+GET /dynamic/404/notfound HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404, 'HTTP-Content' => "Not found here\n" } ];
+ok($tf->handle_http($t) == 0, '404 handler => dynamic(404)');
+
+$t->{REQUEST} = ( <<EOF
+GET /dynamic/nostatus/notfound HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "found here\n" } ];
+ok($tf->handle_http($t) == 0, '404 handler => dynamic(nostatus)');
+
+$t->{REQUEST} = ( <<EOF
+GET /send404.pl HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404, 'HTTP-Content' => "send404\n" } ];
+ok($tf->handle_http($t) == 0, '404 generated by CGI should stay 404');
+
+ok($tf->stop_proc == 0, "Stopping lighttpd");
+
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-condition.t
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-condition.t?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-condition.t (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-condition.t Mon Jul 21 21:35:35 2008
@@ -0,0 +1,139 @@
+#!/usr/bin/env perl
+BEGIN {
+ # add current source dir to the include-path
+ # we need this for make distcheck
+ (my $srcdir = $0) =~ s,/[^/]+$,/,;
+ unshift @INC, $srcdir;
+}
+
+use strict;
+use IO::Socket;
+use Test::More tests => 17;
+use LightyTest;
+
+my $tf = LightyTest->new();
+my $t;
+
+$tf->{CONFIGFILE} = 'condition.conf';
+ok($tf->start_proc == 0, "Starting lighttpd") or die();
+
+$t->{REQUEST} = ( <<EOF
+GET /index.html HTTP/1.0
+Host: www.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_1" } ];
+ok($tf->handle_http($t) == 0, 'config deny');
+
+$t->{REQUEST} = ( <<EOF
+GET /index.html HTTP/1.0
+Host: test1.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_2" } ];
+ok($tf->handle_http($t) == 0, '2nd child of chaining');
+
+$t->{REQUEST} = ( <<EOF
+GET /index.html HTTP/1.0
+Host: test2.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_3" } ];
+ok($tf->handle_http($t) == 0, '3rd child of chaining');
+
+$t->{REQUEST} = ( <<EOF
+GET /index.html HTTP/1.0
+Host: test3.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_5" } ];
+ok($tf->handle_http($t) == 0, 'nesting');
+
+ok($tf->stop_proc == 0, "Stopping lighttpd");
+
+$tf->{CONFIGFILE} = 'lighttpd.conf';
+ok($tf->start_proc == 0, "Starting lighttpd") or die();
+
+$t->{REQUEST} = ( <<EOF
+GET /nofile.png HTTP/1.0
+Host: referer.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ];
+ok($tf->handle_http($t) == 0, 'condition: Referer - no referer');
+
+$t->{REQUEST} = ( <<EOF
+GET /nofile.png HTTP/1.0
+Host: referer.example.org
+Referer: http://referer.example.org/
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ];
+ok($tf->handle_http($t) == 0, 'condition: Referer - referer matches regex');
+
+$t->{REQUEST} = ( <<EOF
+GET /image.jpg HTTP/1.0
+Host: www.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'condition: Referer - no referer');
+
+$t->{REQUEST} = ( <<EOF
+GET /image.jpg HTTP/1.0
+Host: www.example.org
+Referer: http://referer.example.org/
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'condition: Referer - referer matches regex');
+
+$t->{REQUEST} = ( <<EOF
+GET /image.jpg HTTP/1.0
+Host: www.example.org
+Referer: http://evil-referer.example.org/
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
+ok($tf->handle_http($t) == 0, 'condition: Referer - referer doesn\'t match');
+
+$t->{REQUEST} = ( <<EOF
+GET /nofile HTTP/1.1
+Host: bug255.example.org
+
+GET /nofile HTTP/1.1
+Host: bug255.example.org
+Connection: close
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 403 }, { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 403 } ];
+ok($tf->handle_http($t) == 0, 'remote ip cache (#255)');
+
+$t->{REQUEST} = ( <<EOF
+GET /empty-ref.noref HTTP/1.0
+Cookie: empty-ref
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
+ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer is no set');
+
+$t->{REQUEST} = ( <<EOF
+GET /empty-ref.noref HTTP/1.0
+Cookie: empty-ref
+Referer:
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
+ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer is empty');
+
+$t->{REQUEST} = ( <<EOF
+GET /empty-ref.noref HTTP/1.0
+Cookie: empty-ref
+Referer: foobar
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ];
+ok($tf->handle_http($t) == 0, 'condition: $HTTP["referer"] == "" and Referer: foobar');
+
+ok($tf->stop_proc == 0, "Stopping lighttpd");
+
Propchange: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-condition.t
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-keepalive.t
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-keepalive.t?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-keepalive.t (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-keepalive.t Mon Jul 21 21:35:35 2008
@@ -0,0 +1,91 @@
+#!/usr/bin/env perl
+BEGIN {
+ # add current source dir to the include-path
+ # we need this for make distcheck
+ (my $srcdir = $0) =~ s,/[^/]+$,/,;
+ unshift @INC, $srcdir;
+}
+
+use strict;
+use IO::Socket;
+use Test::More tests => 7;
+use LightyTest;
+
+my $tf = LightyTest->new();
+my $t;
+
+ok($tf->start_proc == 0, "Starting lighttpd") or die();
+
+$t->{REQUEST} = ( <<EOF
+GET /12345.txt HTTP/1.0
+Connection: keep-alive
+Host: 123.example.org
+
+GET /12345.txt HTTP/1.0
+Host: 123.example.org
+Connection: close
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } , { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+
+ok($tf->handle_http($t) == 0, 'Explicit HTTP/1.0 Keep-Alive');
+
+undef $t->{RESPONSE};
+
+$t->{REQUEST} = ( <<EOF
+GET /12345.txt HTTP/1.0
+Connection: keep-alive
+Host: 123.example.org
+
+GET /12345.txt HTTP/1.0
+Host: 123.example.org
+Connection: close
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } , { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+
+ok($tf->handle_http($t) == 0, 'Explicit HTTP/1.0 Keep-Alive');
+
+undef $t->{RESPONSE};
+
+$t->{REQUEST} = ( <<EOF
+GET /12345.txt HTTP/1.0
+Connection: keep-alive
+Host: 123.example.org
+
+GET /12345.txt HTTP/1.0
+Host: 123.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } , { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'Implicit HTTP/1.0 Keep-Alive');
+
+
+$t->{REQUEST} = ( <<EOF
+GET /12345.txt HTTP/1.1
+Connection: keep-alive
+Host: 123.example.org
+
+GET /12345.txt HTTP/1.1
+Host: 123.example.org
+Connection: close
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } , { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'Explicit HTTP/1.1 Keep-Alive');
+
+$t->{REQUEST} = ( <<EOF
+GET /12345.txt HTTP/1.1
+Host: 123.example.org
+
+GET /12345.txt HTTP/1.1
+Host: 123.example.org
+Connection: close
+EOF
+ );
+
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } , { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ];
+
+ok($tf->handle_http($t) == 0, 'Implicit HTTP/1.1 Keep-Alive');
+
+ok($tf->stop_proc == 0, "Stopping lighttpd");
Propchange: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-keepalive.t
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-request.t
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-request.t?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-request.t (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-request.t Mon Jul 21 21:35:35 2008
@@ -0,0 +1,310 @@
+#!/usr/bin/env perl
+BEGIN {
+ # add current source dir to the include-path
+ # we need this for make distcheck
+ (my $srcdir = $0) =~ s,/[^/]+$,/,;
+ unshift @INC, $srcdir;
+}
+
+use strict;
+use IO::Socket;
+use Test::More tests => 36;
+use LightyTest;
+
+my $tf = LightyTest->new();
+my $t;
+
+ok($tf->start_proc == 0, "Starting lighttpd") or die();
+
+## Low-Level Request-Header Parsing - URI
+
+$t->{REQUEST} = ( <<EOF
+GET /index%2ehtml HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'URL-encoding');
+
+$t->{REQUEST} = ( <<EOF
+GET /index.html%00 HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ];
+ok($tf->handle_http($t) == 0, 'URL-encoding, %00');
+
+
+
+## Low-Level Request-Header Parsing - Host
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: www.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'hostname');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: 127.0.0.1
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'IPv4 address');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: [::1]
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'IPv6 address');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: www.example.org:80
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'hostname + port');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: 127.0.0.1:80
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'IPv4 address + port');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: [::1]:80
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'IPv6 address + port');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: ../123.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'directory traversal');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: .jsdh.sfdg.sdfg.
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'leading and trailing dot');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: jsdh.sfdg.sdfg.
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'trailing dot is ok');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: .jsdh.sfdg.sdfg
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'leading dot');
+
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: jsdh..sfdg.sdfg
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'two dots');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: jsdh.sfdg.sdfg:asd
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'broken port-number');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: jsdh.sfdg.sdfg:-1
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'negative port-number');
+
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: :80
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'port given but host missing');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: .jsdh.sfdg.:sdfg.
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'port and host are broken');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: a.b-c.d123
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'allowed characters in host-name');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: -a.c
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'leading dash');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: .
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'dot only');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: a192.168.2.10:1234
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'broken IPv4 address - non-digit');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Host: 192.168.2:1234
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'broken IPv4 address - too short');
+
+
+
+## Low-Level Request-Header Parsing - Content-Length
+
+
+$t->{REQUEST} = ( <<EOF
+GET /index.html HTTP/1.0
+Content-Length: -2
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'negative Content-Length');
+
+$t->{REQUEST} = ( <<EOF
+POST /12345.txt HTTP/1.0
+Host: 123.example.org
+Content-Length: 2147483648
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 413 } ];
+ok($tf->handle_http($t) == 0, 'Content-Length > max-request-size');
+
+$t->{REQUEST} = ( <<EOF
+POST /12345.txt HTTP/1.0
+Host: 123.example.org
+Content-Length:
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 411 } ];
+ok($tf->handle_http($t) == 0, 'Content-Length is empty');
+
+print "\nLow-Level Request-Header Parsing - HTTP/1.1\n";
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.1
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'Host missing');
+
+print "\nContent-Type\n";
+$t->{REQUEST} = ( <<EOF
+GET /image.jpg HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Type' => 'image/jpeg' } ];
+ok($tf->handle_http($t) == 0, 'Content-Type - image/jpeg');
+
+$t->{REQUEST} = ( <<EOF
+GET /image.JPG HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Type' => 'image/jpeg' } ];
+ok($tf->handle_http($t) == 0, 'Content-Type - image/jpeg (upper case)');
+
+$t->{REQUEST} = ( <<EOF
+GET /a HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Type' => 'application/octet-stream' } ];
+ok($tf->handle_http($t) == 0, 'Content-Type - unknown');
+
+$t->{REQUEST} = ( <<EOF
+GET HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'empty request-URI');
+
+$t->{REQUEST} = ( <<EOF
+GET /Foo.txt HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'uppercase filenames');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Location: foo
+Location: foobar
+ baz
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, '#1232 - duplicate headers with line-wrapping');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+Location:
+Location: foobar
+ baz
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, '#1232 - duplicate headers with line-wrapping - test 2');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+A:
+Location: foobar
+ baz
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, '#1232 - duplicate headers with line-wrapping - test 3');
+
+
+
+
+ok($tf->stop_proc == 0, "Stopping lighttpd");
+
Propchange: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-request.t
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-response.t
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-response.t?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-response.t (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-response.t Mon Jul 21 21:35:35 2008
@@ -0,0 +1,108 @@
+#!/usr/bin/env perl
+BEGIN {
+ # add current source dir to the include-path
+ # we need this for make distcheck
+ (my $srcdir = $0) =~ s,/[^/]+$,/,;
+ unshift @INC, $srcdir;
+}
+
+use strict;
+use IO::Socket;
+use Test::More tests => 12;
+use LightyTest;
+
+my $tf = LightyTest->new();
+my $t;
+
+ok($tf->start_proc == 0, "Starting lighttpd") or die();
+
+## Low-Level Response-Header Parsing - HTTP/1.1
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.1
+Host: www.example.org
+Connection: close
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, '+Date' => '' } ];
+ok($tf->handle_http($t) == 0, 'Date header');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.1
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 400, 'Connection' => 'close' } ];
+ok($tf->handle_http($t) == 0, 'Host missing');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+ETag' => '' } ];
+ok($tf->handle_http($t) == 0, 'ETag is set');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'ETag' => '/^".+"$/' } ];
+ok($tf->handle_http($t) == 0, 'ETag has quotes');
+
+
+
+## Low-Level Response-Header Parsing - Content-Length
+
+
+$t->{REQUEST} = ( <<EOF
+GET /12345.html HTTP/1.0
+Host: 123.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Length' => '6' } ];
+ok($tf->handle_http($t) == 0, 'Content-Length for text/html');
+
+$t->{REQUEST} = ( <<EOF
+GET /12345.txt HTTP/1.0
+Host: 123.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Length' => '6' } ];
+ok($tf->handle_http($t) == 0, 'Content-Length for text/plain');
+
+
+## Low-Level Response-Header Parsing - Location
+
+$t->{REQUEST} = ( <<EOF
+GET /dummydir HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://'.$tf->{HOSTNAME}.':'.$tf->{PORT}.'/dummydir/' } ];
+ok($tf->handle_http($t) == 0, 'internal redirect in directory');
+
+$t->{REQUEST} = ( <<EOF
+GET /dummydir?foo HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://'.$tf->{HOSTNAME}.':'.$tf->{PORT}.'/dummydir/?foo' } ];
+ok($tf->handle_http($t) == 0, 'internal redirect in directory + querystring');
+
+## simple-vhost
+
+$t->{REQUEST} = ( <<EOF
+GET /12345.txt HTTP/1.0
+Host: no-simple.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Length' => '6' } ];
+ok($tf->handle_http($t) == 0, 'disabling simple-vhost via conditionals');
+
+$t->{REQUEST} = ( <<EOF
+GET /12345.txt HTTP/1.0
+Host: simple.example.org
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ];
+ok($tf->handle_http($t) == 0, 'simple-vhost via conditionals');
+
+ok($tf->stop_proc == 0, "Stopping lighttpd");
+
Propchange: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-response.t
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-var-include.t
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-var-include.t?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-var-include.t (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-var-include.t Mon Jul 21 21:35:35 2008
@@ -0,0 +1,61 @@
+#!/usr/bin/env perl
+BEGIN {
+ # add current source dir to the include-path
+ # we need this for make distcheck
+ (my $srcdir = $0) =~ s,/[^/]+$,/,;
+ unshift @INC, $srcdir;
+}
+
+use strict;
+use IO::Socket;
+use Test::More tests => 17;
+use LightyTest;
+
+my $tf = LightyTest->new();
+my $t;
+
+$ENV{"env_test"} = "good_env";
+
+$tf->{CONFIGFILE} = 'var-include.conf';
+
+ok($tf->start_proc == 0, "Starting lighttpd") or die();
+
+$t->{REQUEST} = ( "GET /index.html HTTP/1.0\r\nHost: www.example.org\r\n" );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/redirect" } ];
+ok($tf->handle_http($t) == 0, 'basic test');
+
+my $myvar = "good";
+my $server_name = "test.example.org";
+my $mystr = "string";
+$mystr .= "_append";
+my $tests = {
+ "include" => "/good_include",
+ "concat" => "/good_" . "concat",
+ "servername1" => "/good_" . $server_name,
+ "servername2" => $server_name . "/good_",
+ "servername3" => "/good_" . $server_name . "/",
+ "var.myvar" => "/good_var_myvar" . $myvar,
+ "myvar" => "/good_myvar" . $myvar,
+ "env" => "/" . $ENV{"env_test"},
+
+ "number1" => "/good_number" . "1",
+ "number2" => "1" . "/good_number",
+ "array_append" => "/good_array_append",
+ "string_append" => "/good_" . $mystr,
+ "number_append" => "/good_" . "2",
+
+ "include_shell" => "/good_include_shell_" . "456"
+};
+
+foreach my $test (keys %{ $tests }) {
+ my $expect = $tests->{$test};
+ $t->{REQUEST} = ( <<EOF
+GET /$test HTTP/1.0
+Host: $server_name
+EOF
+ );
+ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => $expect } ];
+ ok($tf->handle_http($t) == 0, $test);
+}
+
+ok($tf->stop_proc == 0, "Stopping lighttpd");
Propchange: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core-var-include.t
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core.t
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core.t?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core.t (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core.t Mon Jul 21 21:35:35 2008
@@ -0,0 +1,166 @@
+#!/usr/bin/env perl
+BEGIN {
+ # add current source dir to the include-path
+ # we need this for make distcheck
+ (my $srcdir = $0) =~ s,/[^/]+$,/,;
+ unshift @INC, $srcdir;
+}
+
+use strict;
+use IO::Socket;
+use Test::More tests => 21;
+use LightyTest;
+
+my $tf = LightyTest->new();
+my $t;
+
+ok($tf->start_proc == 0, "Starting lighttpd") or die();
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'Valid HTTP/1.0 Request') or die();
+
+$t->{REQUEST} = ( <<EOF
+GET /
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'missing Protocol');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/01.01
+Host: foo
+Connection: close
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'zeros in protocol version');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/.01
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'missing major version');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/01.
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'missing minor version');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/a.b
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'strings as version');
+
+$t->{REQUEST} = ( <<EOF
+BC /
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'missing protocol + unknown method');
+
+$t->{REQUEST} = ( <<EOF
+ABC
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'missing protocol + unknown method + missing URI');
+
+$t->{REQUEST} = ( <<EOF
+ABC / HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 501 } ];
+ok($tf->handle_http($t) == 0, 'unknown method');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.3
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 505 } ];
+ok($tf->handle_http($t) == 0, 'unknown protocol');
+
+$t->{REQUEST} = ( <<EOF
+GET http://www.example.org/ HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'absolute URI');
+
+print "\nLow-Level Request-Header Parsing\n";
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+ABC : foo
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'whitespace after key');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+ABC a: foo
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ];
+ok($tf->handle_http($t) == 0, 'whitespace with-in key');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+ABC:foo
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'no whitespace');
+
+$t->{REQUEST} = ( <<EOF
+GET / HTTP/1.0
+ABC:foo
+ bc
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'line-folding');
+
+print "\nLow-Level Request-Header Parsing - URI\n";
+$t->{REQUEST} = ( <<EOF
+GET /index%2ehtml HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'URL-encoding');
+
+$t->{REQUEST} = ( <<EOF
+GET /index.html%00 HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ];
+ok($tf->handle_http($t) == 0, 'URL-encoding, %00');
+
+$t->{REQUEST} = ( <<EOF
+OPTIONS * HTTP/1.0
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'OPTIONS');
+
+$t->{REQUEST} = ( <<EOF
+OPTIONS / HTTP/1.1
+Host: www.example.org
+Connection: close
+EOF
+ );
+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ];
+ok($tf->handle_http($t) == 0, 'OPTIONS');
+
+
+
+ok($tf->stop_proc == 0, "Stopping lighttpd");
+
Propchange: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/core.t
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/12345.html
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/12345.html?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/12345.html (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/12345.html Mon Jul 21 21:35:35 2008
@@ -0,0 +1 @@
+12345
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/12345.txt
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/12345.txt?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/12345.txt (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/12345.txt Mon Jul 21 21:35:35 2008
@@ -0,0 +1 @@
+12345
Added: webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/Makefile.am?rev=678637&view=auto
==============================================================================
--- webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/Makefile.am (added)
+++ webservices/axis2/branches/c/lighttpd_mod_axis2/lighttpd/tests/docroot/123/Makefile.am Mon Jul 21 21:35:35 2008
@@ -0,0 +1 @@
+EXTRA_DIST=12345.html 12345.txt dummyfile.bla phpinfo.php