diff options
Diffstat (limited to 'data/lighttpd/lighttpd-1.4.53/tests')
94 files changed, 9632 insertions, 0 deletions
diff --git a/data/lighttpd/lighttpd-1.4.53/tests/404-handler.conf b/data/lighttpd/lighttpd-1.4.53/tests/404-handler.conf new file mode 100644 index 000000000..2009e6eb5 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/404-handler.conf @@ -0,0 +1,41 @@ +debug.log-request-handling = "enable" +debug.log-response-header = "enable" +debug.log-request-header = "enable" + +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +## 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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" +server.tag = "Apache 1.3.29" + + +server.modules = ( + "mod_cgi", + "mod_accesslog", +) + +accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log" + +mimetype.assign = ( + ".html" => "text/html", +) + +cgi.assign = ( + ".pl" => env.PERL, +) + +$HTTP["url"] =~ "^/static/" { + server.error-handler-404 = "/404.html" +} +else $HTTP["url"] =~ "^/dynamic/redirect_status/" { + server.error-handler = "/404.pl" +} +else $HTTP["url"] =~ "." { + server.error-handler-404 = "/404.pl" +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/CMakeLists.txt b/data/lighttpd/lighttpd-1.4.53/tests/CMakeLists.txt new file mode 100644 index 000000000..55bbaf603 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/CMakeLists.txt @@ -0,0 +1,44 @@ +check_include_files(fastcgi.h HAVE_FASTCGI_H) +check_include_files(fastcgi/fastcgi.h HAVE_FASTCGI_FASTCGI_H) +if(HAVE_FASTCGI_H OR HAVE_FASTCGI_FASTCGI_H) + check_library_exists(fcgi FCGI_Accept "" HAVE_FASTCGI) + if(HAVE_FASTCGI) + add_executable(fcgi-auth fcgi-auth.c) + add_executable(fcgi-responder fcgi-responder.c) + target_link_libraries(fcgi-auth fcgi) + target_link_libraries(fcgi-responder fcgi) + endif() +endif() +add_executable(scgi-responder scgi-responder.c) + +set(T_FILES + prepare.sh + cachable.t + core-404-handler.t + core-condition.t + core-keepalive.t + core-request.t + core-response.t + core-var-include.t + lowercase.t + mod-auth.t + mod-cgi.t + mod-compress.t + mod-extforward.t + mod-fastcgi.t + mod-proxy.t + mod-secdownload.t + mod-setenv.t + mod-ssi.t + mod-userdir.t + request.t + symlink.t + cleanup.sh +) + +foreach(it ${T_FILES}) + add_test(NAME ${it} COMMAND "${lighttpd_SOURCE_DIR}/tests/wrapper.sh" + "${lighttpd_SOURCE_DIR}/tests" + "${lighttpd_BINARY_DIR}" + "${lighttpd_SOURCE_DIR}/tests/${it}") +endforeach() diff --git a/data/lighttpd/lighttpd-1.4.53/tests/LightyTest.pm b/data/lighttpd/lighttpd-1.4.53/tests/LightyTest.pm new file mode 100644 index 000000000..74caea1e4 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/LightyTest.pm @@ -0,0 +1,447 @@ +package LightyTest; + +use strict; +use IO::Socket; +use Test::More; +use Socket; +use Cwd 'abs_path'; +use POSIX qw(:sys_wait_h dup2); +use Errno qw(EADDRINUSE); + +sub find_program { + my @DEFAULT_PATHS = ('/usr/bin/', '/usr/local/bin/'); + my ($envname, $program) = @_; + my $location; + + if (defined $ENV{$envname}) { + $location = $ENV{$envname}; + } else { + $location = `which "$program" 2>/dev/null`; + chomp $location; + if (! -x $location) { + for my $path (@DEFAULT_PATHS) { + $location = $path . $program; + last if -x $location; + } + } + } + + if (-x $location) { + $ENV{$envname} = $location; + return 1; + } else { + delete $ENV{$envname}; + return 0; + } +} + +BEGIN { + our $HAVE_PHP = find_program('PHP', 'php-cgi'); + our $HAVE_PERL = find_program('PERL', 'perl'); + if (!$HAVE_PERL) { + die "Couldn't find path to perl, but it obviously seems to be running"; + } +} + +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->{BINDIR} = $self->{BASEDIR}.'/src'; + if (mtime($self->{BASEDIR}.'/src/.libs')) { + $self->{MODULES_PATH} = $self->{BASEDIR}.'/src/.libs'; + } else { + $self->{MODULES_PATH} = $self->{BASEDIR}.'/src'; + } + } else { + $self->{BINDIR} = $self->{BASEDIR}.'/build'; + $self->{MODULES_PATH} = $self->{BASEDIR}.'/build'; + } + $self->{LIGHTTPD_PATH} = $self->{BINDIR}.'/lighttpd'; + $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; + + my $pid = $self->{LIGHTTPD_PID}; + if (defined $pid && $pid != -1) { + kill('TERM', $pid) or return -1; + return -1 if ($pid != waitpid($pid, 0)); + } else { + diag("\nProcess not started, nothing to stop"); + return -1; + } + + return 0; +} + +sub wait_for_port_with_proc { + my $self = shift; + my $port = shift; + my $child = shift; + my $timeout = 10*50; # 10 secs (valgrind might take a while), select waits 0.02 s + + while (0 == $self->listening_on($port)) { + select(undef, undef, undef, 0.02); + $timeout--; + + # the process is gone, we failed + if (0 != waitpid($child, WNOHANG)) { + return -1; + } + if (0 >= $timeout) { + diag("\nTimeout while trying to connect; killing child"); + kill('TERM', $child); + return -1; + } + } + + return 0; +} + +sub start_proc { + my $self = shift; + # kill old proc if necessary + #$self->stop_proc; + + if ($self->listening_on($self->{PORT})) { + diag("\nPort ".$self->{PORT}." already in use"); + return -1; + } + + # pre-process configfile if necessary + # + + $ENV{'SRCDIR'} = $self->{BASEDIR}.'/tests'; + $ENV{'PORT'} = $self->{PORT}; + + my @cmdline = ($self->{LIGHTTPD_PATH}, "-D", "-f", $self->{SRCDIR}."/".$self->{CONFIGFILE}, "-m", $self->{MODULES_PATH}); + if (defined $ENV{"TRACEME"} && $ENV{"TRACEME"} eq 'strace') { + @cmdline = (qw(strace -tt -s 4096 -o strace -f -v), @cmdline); + } elsif (defined $ENV{"TRACEME"} && $ENV{"TRACEME"} eq 'truss') { + @cmdline = (qw(truss -a -l -w all -v all -o strace), @cmdline); + } elsif (defined $ENV{"TRACEME"} && $ENV{"TRACEME"} eq 'gdb') { + @cmdline = ('gdb', '--batch', '--ex', 'run', '--ex', 'bt full', '--args', @cmdline); + } elsif (defined $ENV{"TRACEME"} && $ENV{"TRACEME"} eq 'valgrind') { + @cmdline = (qw(valgrind --tool=memcheck --track-origins=yes --show-reachable=yes --leak-check=yes --log-file=valgrind.%p), @cmdline); + } + # diag("\nstarting lighttpd at :".$self->{PORT}.", cmdline: ".@cmdline ); + my $child = fork(); + if (not defined $child) { + diag("\nFork failed"); + return -1; + } + if ($child == 0) { + exec @cmdline or die($?); + } + + if (0 != $self->wait_for_port_with_proc($self->{PORT}, $child)) { + diag(sprintf('\nThe process %i is not up', $child)); + return -1; + } + + $self->{LIGHTTPD_PID} = $child; + + 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 $slow = defined $t->{SLOWREQUEST}; + my $is_debug = $ENV{"TRACE_HTTP"}; + + my $remote = + IO::Socket::INET->new( + Proto => "tcp", + PeerAddr => $host, + PeerPort => $self->{PORT}); + + if (not defined $remote) { + diag("\nconnect failed: $!"); + return -1; + } + + $remote->autoflush(1); + + if (!$slow) { + diag("\nsending request header to ".$host.":".$self->{PORT}) if $is_debug; + foreach(@request) { + # pipeline requests + s/\r//g; + s/\n/$EOL/g; + + print $remote $_.$BLANK; + diag("\n<< ".$_) if $is_debug; + } + shutdown($remote, 1) if ($^O ne "openbsd" && $^O ne "dragonfly"); # I've stopped writing data + } else { + diag("\nsending request header to ".$host.":".$self->{PORT}) if $is_debug; + foreach(@request) { + # pipeline requests + chomp; + s/\r//g; + s/\n/$EOL/g; + + print $remote $_; + diag("<< ".$_."\n") if $is_debug; + select(undef, undef, undef, 0.1); + print $remote "\015"; + select(undef, undef, undef, 0.1); + print $remote "\012"; + select(undef, undef, undef, 0.1); + print $remote "\015"; + select(undef, undef, undef, 0.1); + print $remote "\012"; + select(undef, undef, undef, 0.1); + } + + } + diag("\n... done") if $is_debug; + + my $lines = ""; + + diag("\nreceiving response") if $is_debug; + # read everything + while(<$remote>) { + $lines .= $_; + diag(">> ".$_) if $is_debug; + } + diag("\n... done") if $is_debug; + + 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(!defined $line or 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("\nheader '%s' is duplicated: '%s' and '%s'\n", +# $h, $resp_hdr{$h}, $2)); + $resp_hdr{$h} .= ', '.$2; + } else { + $resp_hdr{$h} = $2; + } + } else { + diag(sprintf("\nunexpected line '%s'", $line)); + return -1; + } + } + } + + if (not defined($resp_line)) { + diag(sprintf("\nempty response")); + 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("\nproto failed: expected '%s', got '%s'", $href->{'HTTP-Protocol'}, $1)); + return -1; + } + if ($href->{'HTTP-Status'} ne $2) { + diag(sprintf("\nstatus failed: expected '%s', got '%s'", $href->{'HTTP-Status'}, $2)); + return -1; + } + } else { + diag(sprintf("\nunexpected resp_line '%s'", $resp_line)); + return -1; + } + + if (defined $href->{'HTTP-Content'}) { + $resp_body = "" unless defined $resp_body; + if ($href->{'HTTP-Content'} ne $resp_body) { + diag(sprintf("\nbody failed: expected '%s', got '%s'", $href->{'HTTP-Content'}, $resp_body)); + return -1; + } + } + + if (defined $href->{'-HTTP-Content'}) { + if (defined $resp_body && $resp_body ne '') { + diag(sprintf("\nbody failed: expected empty body, got '%s'", $resp_body)); + return -1; + } + } + + foreach (keys %{ $href }) { + 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 '+') { + $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("\nheader '%s' MUST not be set", $k)); + return -1; + } + } else { + if (not defined $resp_hdr{$k}) { + diag(sprintf("\nrequired header '%s' is missing", $k)); + return -1; + } + } + + if ($verify_value) { + if ($href->{$_} =~ /^\/(.+)\/$/) { + if ($resp_hdr{$k} !~ /$1/) { + diag(sprintf( + "\nresponse-header failed: expected '%s', got '%s', regex: %s", + $href->{$_}, $resp_hdr{$k}, $1)); + return -1; + } + } elsif ($href->{$_} ne $resp_hdr{$k}) { + diag(sprintf( + "\nresponse-header failed: expected '%s', got '%s'", + $href->{$_}, $resp_hdr{$k})); + return -1; + } + } + } + } + + # we should have sucked up everything + if (defined $lines) { + diag(sprintf("\nunexpected lines '%s'", $lines)); + return -1; + } + + return 0; +} + +sub spawnfcgi { + my ($self, $binary, $port) = @_; + my $child = fork(); + if (not defined $child) { + diag("\nCouldn't fork"); + return -1; + } + if ($child == 0) { + my $iaddr = inet_aton('localhost') || die "no host: localhost"; + my $proto = getprotobyname('tcp'); + socket(SOCK, PF_INET, SOCK_STREAM, $proto) || die "socket: $!"; + setsockopt(SOCK, SOL_SOCKET, SO_REUSEADDR, pack("l", 1)) || die "setsockopt: $!"; + bind(SOCK, sockaddr_in($port, $iaddr)) || die "bind: $!"; + listen(SOCK, 1024) || die "listen: $!"; + dup2(fileno(SOCK), 0) || die "dup2: $!"; + exec { $binary } ($binary) or die($?); + } else { + if (0 != $self->wait_for_port_with_proc($port, $child)) { + diag(sprintf("\nThe process %i is not up (port %i, %s)", $child, $port, $binary)); + return -1; + } + return $child; + } +} + +sub endspawnfcgi { + my ($self, $pid) = @_; + return -1 if (-1 == $pid); + kill(2, $pid); + waitpid($pid, 0); + return 0; +} + +1; diff --git a/data/lighttpd/lighttpd-1.4.53/tests/Makefile.am b/data/lighttpd/lighttpd-1.4.53/tests/Makefile.am new file mode 100644 index 000000000..1582be86b --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/Makefile.am @@ -0,0 +1,79 @@ +# lighttpd.conf and conformance.pl expect this directory +testdir=$(srcdir)/tmp/lighttpd/ + +if CHECK_WITH_FASTCGI +check_PROGRAMS=fcgi-auth fcgi-responder scgi-responder + +fcgi_auth_SOURCES=fcgi-auth.c +fcgi_auth_LDADD=-lfcgi + +fcgi_responder_SOURCES=fcgi-responder.c +fcgi_responder_LDADD=-lfcgi +endif + +scgi_responder_SOURCES=scgi-responder.c + +TESTS=\ + prepare.sh \ + run-tests.pl \ + cleanup.sh + +CONFS=\ + 404-handler.conf \ + cachable.t \ + condition.conf \ + core-404-handler.t \ + core-condition.t \ + core-keepalive.t \ + core-request.t \ + core-response.t \ + core-var-include.t \ + fastcgi-10.conf \ + fastcgi-responder.conf \ + LightyTest.pm \ + lowercase.conf \ + lowercase.t \ + mod-auth.conf \ + mod-auth.t \ + mod-cgi.t \ + mod-compress.conf \ + mod-compress.t \ + mod-extforward.conf \ + mod-extforward.t \ + mod-fastcgi.t \ + mod-proxy.t \ + mod-secdownload.conf \ + mod-secdownload.t \ + mod-setenv.t \ + mod-ssi.t \ + mod-userdir.t \ + proxy.conf \ + request.t \ + scgi-responder.conf \ + symlink.t \ + var-include-sub.conf \ + var-include.conf + +TESTS_ENVIRONMENT=$(srcdir)/wrapper.sh $(srcdir) $(top_builddir) + +EXTRA_DIST=\ + $(CONFS) \ + $(TESTS) \ + CMakeLists.txt \ + meson.build \ + lighttpd.conf \ + lighttpd.htpasswd \ + lighttpd.user \ + SConscript \ + wrapper.sh + +SUBDIRS=docroot + +leak-check: + for i in $(TESTS); do \ + $(srcdir)/$$i; \ + echo $$?; \ + done + +clean-local: + rm -f *.out diff --git a/data/lighttpd/lighttpd-1.4.53/tests/Makefile.in b/data/lighttpd/lighttpd-1.4.53/tests/Makefile.in new file mode 100644 index 000000000..34797748f --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/Makefile.in @@ -0,0 +1,975 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 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@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +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@ +@CHECK_WITH_FASTCGI_TRUE@check_PROGRAMS = fcgi-auth$(EXEEXT) \ +@CHECK_WITH_FASTCGI_TRUE@ fcgi-responder$(EXEEXT) \ +@CHECK_WITH_FASTCGI_TRUE@ scgi-responder$(EXEEXT) +subdir = tests +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/scripts/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_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_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +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 = +am_scgi_responder_OBJECTS = scgi-responder.$(OBJEXT) +scgi_responder_OBJECTS = $(am_scgi_responder_OBJECTS) +scgi_responder_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/fcgi-auth.Po \ + ./$(DEPDIR)/fcgi-responder.Po ./$(DEPDIR)/scgi-responder.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(fcgi_auth_SOURCES) $(fcgi_responder_SOURCES) \ + $(scgi_responder_SOURCES) +DIST_SOURCES = $(am__fcgi_auth_SOURCES_DIST) \ + $(am__fcgi_responder_SOURCES_DIST) $(scgi_responder_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red='[0;31m'; \ + grn='[0;32m'; \ + lgn='[1;32m'; \ + blu='[1;34m'; \ + mgn='[0;35m'; \ + brg='[1m'; \ + std='[m'; \ + fi; \ +} +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ATTR_LIB = @ATTR_LIB@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +BZ_LIB = @BZ_LIB@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CRYPTO_LIB = @CRYPTO_LIB@ +CRYPT_LIB = @CRYPT_LIB@ +CYGPATH_W = @CYGPATH_W@ +DBI_CFLAGS = @DBI_CFLAGS@ +DBI_LIBS = @DBI_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIB = @DL_LIB@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FAM_CFLAGS = @FAM_CFLAGS@ +FAM_LIBS = @FAM_LIBS@ +FGREP = @FGREP@ +GDBM_LIB = @GDBM_LIB@ +GEOIP_LIB = @GEOIP_LIB@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5_LIB = @KRB5_LIB@ +LBER_LIB = @LBER_LIB@ +LD = @LD@ +LDAP_LIB = @LDAP_LIB@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBEV_CFLAGS = @LIBEV_CFLAGS@ +LIBEV_LIBS = @LIBEV_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LIBS = @LUA_LIBS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEMCACHED_LIB = @MEMCACHED_LIB@ +MKDIR_P = @MKDIR_P@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_CONFIG = @MYSQL_CONFIG@ +MYSQL_LIBS = @MYSQL_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_LIB = @PAM_LIB@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRECONFIG = @PCRECONFIG@ +PCRE_LIB = @PCRE_LIB@ +PGSQL_CONFIG = @PGSQL_CONFIG@ +PGSQL_INCLUDE = @PGSQL_INCLUDE@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SASL_CFLAGS = @SASL_CFLAGS@ +SASL_LIBS = @SASL_LIBS@ +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@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +Z_LIB = @Z_LIB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +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@ +builddir = @builddir@ +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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# 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 +scgi_responder_SOURCES = scgi-responder.c +TESTS = \ + prepare.sh \ + run-tests.pl \ + cleanup.sh + +CONFS = \ + 404-handler.conf \ + cachable.t \ + condition.conf \ + core-404-handler.t \ + core-condition.t \ + core-keepalive.t \ + core-request.t \ + core-response.t \ + core-var-include.t \ + fastcgi-10.conf \ + fastcgi-responder.conf \ + LightyTest.pm \ + lowercase.conf \ + lowercase.t \ + mod-auth.conf \ + mod-auth.t \ + mod-cgi.t \ + mod-compress.conf \ + mod-compress.t \ + mod-extforward.conf \ + mod-extforward.t \ + mod-fastcgi.t \ + mod-proxy.t \ + mod-secdownload.conf \ + mod-secdownload.t \ + mod-setenv.t \ + mod-ssi.t \ + mod-userdir.t \ + proxy.conf \ + request.t \ + scgi-responder.conf \ + symlink.t \ + var-include-sub.conf \ + var-include.conf + +TESTS_ENVIRONMENT = $(srcdir)/wrapper.sh $(srcdir) $(top_builddir) +EXTRA_DIST = \ + $(CONFS) \ + $(TESTS) \ + CMakeLists.txt \ + meson.build \ + lighttpd.conf \ + lighttpd.htpasswd \ + lighttpd.user \ + SConscript \ + wrapper.sh + +SUBDIRS = docroot +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/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__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +fcgi-auth$(EXEEXT): $(fcgi_auth_OBJECTS) $(fcgi_auth_DEPENDENCIES) $(EXTRA_fcgi_auth_DEPENDENCIES) + @rm -f fcgi-auth$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcgi_auth_OBJECTS) $(fcgi_auth_LDADD) $(LIBS) + +fcgi-responder$(EXEEXT): $(fcgi_responder_OBJECTS) $(fcgi_responder_DEPENDENCIES) $(EXTRA_fcgi_responder_DEPENDENCIES) + @rm -f fcgi-responder$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(fcgi_responder_OBJECTS) $(fcgi_responder_LDADD) $(LIBS) + +scgi-responder$(EXEEXT): $(scgi_responder_OBJECTS) $(scgi_responder_DEPENDENCIES) $(EXTRA_scgi_responder_DEPENDENCIES) + @rm -f scgi-responder$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(scgi_responder_OBJECTS) $(scgi_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@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcgi-responder.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scgi-responder.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# 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. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + 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; \ + ($(am__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" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + 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 || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +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) '; \ + $(am__tty_colors); \ + 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 $(AM_TESTS_FD_REDIRECT); then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + 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 \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + 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`; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$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 \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + 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: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 -f ./$(DEPDIR)/fcgi-auth.Po + -rm -f ./$(DEPDIR)/fcgi-responder.Po + -rm -f ./$(DEPDIR)/scgi-responder.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f ./$(DEPDIR)/fcgi-auth.Po + -rm -f ./$(DEPDIR)/fcgi-responder.Po + -rm -f ./$(DEPDIR)/scgi-responder.Po + -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: + +.MAKE: $(am__recursive_targets) check-am install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--depfiles check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool clean-local \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +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: diff --git a/data/lighttpd/lighttpd-1.4.53/tests/SConscript b/data/lighttpd/lighttpd-1.4.53/tests/SConscript new file mode 100644 index 000000000..1b14569de --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/SConscript @@ -0,0 +1,81 @@ +Import('env') + +tests = Split('prepare.sh \ + run-tests.pl \ + cleanup.sh') + +extra_dist = Split('fastcgi-10.conf \ + fastcgi-responder.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 \ + mod-auth.conf \ + mod-auth.t \ + mod-cgi.t \ + mod-compress.t \ + mod-compress.conf \ + mod-fastcgi.t \ + mod-userdir.t \ + request.t \ + mod-ssi.t \ + LightyTest.pm \ + mod-setenv.t') + +fcgi_auth = None +fcgi_responder = None +scgi_responder = env.Program("scgi-responder", "scgi-responder.c") + +if env['LIBFCGI']: + fcgi_auth = env.Program("fcgi-auth", "fcgi-auth.c", LIBS=[env['LIBFCGI'], env['APPEND_LIBS']]) + fcgi_responder = env.Program("fcgi-responder", "fcgi-responder.c", LIBS=[env['LIBFCGI'], env['APPEND_LIBS']]) + +def CopyTestBinary(env, binary): + return env.Command(target = env['ENV']['top_builddir'] + '/tests/' + binary, source = binary, action = Copy("$TARGET", "$SOURCE")) + +def BuildTestEnv(env, build_type): + builddir = build_type + dependencies = [build_type] + if build_type == 'dynamic': + builddir = '.' + dependencies += ['modules'] + + testenv = env.Clone() + testenv['ENV']['srcdir']='tests' + testenv['ENV']['top_builddir']='sconsbuild/' + builddir + prepare = testenv.AlwaysBuild(testenv.Command(build_type + '/prepare', 'prepare.sh', 'tests/prepare.sh')) + runtests = testenv.AlwaysBuild(testenv.Command(build_type + '/run-tests', 'run-tests.pl', 'tests/run-tests.pl')) + cleanup = testenv.AlwaysBuild(testenv.Command(build_type + '/cleanup', 'cleanup.sh', 'tests/cleanup.sh')) + testenv.Depends(runtests, prepare) + testenv.Depends(cleanup, runtests) + SideEffect('dummy-file-prevent-running-tests-in-parallel', runtests) + + testenv.Depends(runtests, dependencies) + + if env['LIBFCGI']: + fcgis = [CopyTestBinary(testenv, 'fcgi-auth'), CopyTestBinary(testenv, 'fcgi-responder')] + testenv.Depends(runtests, fcgis) + + return [prepare, runtests, cleanup] + +check_dynamic = env.Alias('check_dynamic', BuildTestEnv(env, 'dynamic')) +env.Depends(check_dynamic, 'modules') +check_static = env.Alias('check_static', BuildTestEnv(env, 'static')) +check_fullstatic = env.Alias('check_fullstatic', BuildTestEnv(env, 'fullstatic')) + +checks = [] + +if env['build_dynamic']: + checks += check_dynamic + +if env['build_static']: + checks += check_static + +if env['build_fullstatic']: + checks += check_fullstatic + +env.Alias('check', checks) diff --git a/data/lighttpd/lighttpd-1.4.53/tests/cachable.t b/data/lighttpd/lighttpd-1.4.53/tests/cachable.t new file mode 100755 index 000000000..d0790e0ec --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/cachable.t @@ -0,0 +1,219 @@ +#!/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 => 25; +use LightyTest; + +my $tf = LightyTest->new(); +my $t; + +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' => 304 } ]; +ok($tf->handle_http($t) == 0, 'Conditional GET - ETag + old Last-Modified (which should be ignored)'); + +$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 (which should be ignored)'); + +$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' => 304 } ]; +ok($tf->handle_http($t) == 0, 'Conditional GET - ETag + Last-Modified + overlong timestamp (which should be ignored)'); + +$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($etag =~ /^\"(.*)\"$/, "The server must quote ETags"); + +$t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +If-None-Match: $1 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'The client must send a quoted ETag'); + +$etag =~ /^(\".*)\"$/; +$t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +If-None-Match: $1 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'The ETag must be surrounded by quotes'); + +$t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +If-None-Match: * +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; +ok($tf->handle_http($t) == 0, 'An unquoted star matches any ETag'); + +$t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +If-None-Match: "*" +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'A quoted star is just a regular ETag'); + +TODO: { + local $TODO = "weak etags not allowed yet"; + $t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +If-None-Match: W/$etag +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; + ok($tf->handle_http($t) == 0, 'A weak etag matches like a regular ETag for HEAD and GET'); +} + +$t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +If-None-Match: W/$etag +Range: bytes=0-0 +EOF +); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 206, 'HTTP-Content' => '<' } ]; +ok($tf->handle_http($t) == 0, 'A weak etag does not match for ranged requests'); + +$t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +If-None-Match: W/"12345" +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'However, a weak ETag is not *'); + +$t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +If-None-Match: "12345", $etag +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; +ok($tf->handle_http($t) == 0, 'Client sent a list of ETags, the second matches'); + +TODO: { + local $TODO = "weak etags not allowed yet"; + $t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +If-None-Match: "12345", W/$etag +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; + ok($tf->handle_http($t) == 0, 'The second provided ETag matches weakly'); +} + +$t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +If-None-Match: "12345",, ,, , $etag +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; +ok($tf->handle_http($t) == 0, 'Broken client did get around to sending good data'); + +$t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +If-None-Match: "1234", $etag, "brokentrailing +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; +ok($tf->handle_http($t) == 0, 'Bad syntax *after* a matching ETag doesn\'t matter'); + +ok($tf->stop_proc == 0, "Stopping lighttpd"); + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/cleanup.sh b/data/lighttpd/lighttpd-1.4.53/tests/cleanup.sh new file mode 100755 index 000000000..ec68ed71a --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/cleanup.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +if test x$srcdir = x; then + srcdir=. +fi + +if test x$top_builddir = x; then + top_builddir=.. +fi + +tmpdir="$top_builddir/tests/tmp/" + +# remove test-framework +rm -rf "$tmpdir" + +printf "%-40s" "cleaning up" + +exit 0 diff --git a/data/lighttpd/lighttpd-1.4.53/tests/condition.conf b/data/lighttpd/lighttpd-1.4.53/tests/condition.conf new file mode 100644 index 000000000..c89ccd06e --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/condition.conf @@ -0,0 +1,91 @@ + +debug.log-request-handling = "enable" +debug.log-condition-handling = "enable" + +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +## 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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" +server.tag = "Apache 1.3.29" + + +server.modules = ( + "mod_redirect", + "mod_accesslog", +) + +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", + ) + } +} + +else $HTTP["host"] == "test4.example.org" { + server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + server.name = "test4.example.org" + url.redirect = ( + "^" => "/match_6", + ) + + $HTTP["url"] =~ "^/subdir/" { + url.redirect = ( + "^" => "/match_7", + ) + } +} + +$HTTP["url"] != "/show/other/server-tag" { +} +else $HTTP["scheme"] == "http" { + server.tag = "special tag" +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/core-404-handler.t b/data/lighttpd/lighttpd-1.4.53/tests/core-404-handler.t new file mode 100755 index 000000000..a7259ae7a --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/core-404-handler.t @@ -0,0 +1,83 @@ +#!/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 => 9; +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/redirect_status/ HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404, 'HTTP-Content' => "REDIRECT_STATUS\n" } ]; +ok($tf->handle_http($t) == 0, 'error handler => dynamic(REDIRECT_STATUS)'); + +$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"); + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/core-condition.t b/data/lighttpd/lighttpd-1.4.53/tests/core-condition.t new file mode 100755 index 000000000..53b69c5e9 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/core-condition.t @@ -0,0 +1,168 @@ +#!/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; + +$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'); + +$t->{REQUEST} = ( <<EOF +GET /subdir/index.html HTTP/1.0 +Host: test4.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_7" } ]; +ok($tf->handle_http($t) == 0, 'url subdir'); + +$t->{REQUEST} = ( <<EOF +GET /subdir/../css/index.html HTTP/1.0 +Host: test4.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => "/match_6" } ]; +ok($tf->handle_http($t) == 0, 'url subdir with path traversal'); + +$t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Server' => 'Apache 1.3.29' } ]; +ok($tf->handle_http($t) == 0, 'condition: handle if before else branches'); + +$t->{REQUEST} = ( <<EOF +GET /show/other/server-tag HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Server' => 'special tag' } ]; +ok($tf->handle_http($t) == 0, 'condition: handle if before else branches #2'); + +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"); diff --git a/data/lighttpd/lighttpd-1.4.53/tests/core-keepalive.t b/data/lighttpd/lighttpd-1.4.53/tests/core-keepalive.t new file mode 100755 index 000000000..b4f51f901 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/core-keepalive.t @@ -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"); diff --git a/data/lighttpd/lighttpd-1.4.53/tests/core-request.t b/data/lighttpd/lighttpd-1.4.53/tests/core-request.t new file mode 100755 index 000000000..6de62f85f --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/core-request.t @@ -0,0 +1,100 @@ +#!/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(); + + +$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 +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'); + + +## 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'); + +$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'); + + +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 /Foo.txt HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'uppercase filenames'); + + +ok($tf->stop_proc == 0, "Stopping lighttpd"); diff --git a/data/lighttpd/lighttpd-1.4.53/tests/core-response.t b/data/lighttpd/lighttpd-1.4.53/tests/core-response.t new file mode 100755 index 000000000..29aee6a48 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/core-response.t @@ -0,0 +1,122 @@ +#!/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 => 14; +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'); + +$t->{REQUEST} = ( <<EOF +GET /~test%20ä_ HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://'.$tf->{HOSTNAME}.':'.$tf->{PORT}.'/~test%20%C3%A4_/' } ]; +ok($tf->handle_http($t) == 0, 'internal redirect in directory with special characters'); + +$t->{REQUEST} = ( <<EOF +GET /~test%20ä_?foo HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://'.$tf->{HOSTNAME}.':'.$tf->{PORT}.'/~test%20%C3%A4_/?foo' } ]; +ok($tf->handle_http($t) == 0, 'internal redirect in directory with special characters + 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"); + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/core-var-include.t b/data/lighttpd/lighttpd-1.4.53/tests/core-var-include.t new file mode 100755 index 000000000..8161751b3 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/core-var-include.t @@ -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"); diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/12345.html b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/12345.html new file mode 100644 index 000000000..e56e15bb7 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/12345.html @@ -0,0 +1 @@ +12345 diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/12345.txt b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/12345.txt new file mode 100644 index 000000000..e56e15bb7 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/12345.txt @@ -0,0 +1 @@ +12345 diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/Makefile.am b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/Makefile.am new file mode 100644 index 000000000..e998042e9 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST=12345.html 12345.txt dummyfile.bla phpinfo.php diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/Makefile.in b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/Makefile.in new file mode 100644 index 000000000..bd313ec5e --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/Makefile.in @@ -0,0 +1,490 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 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@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +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@ +subdir = tests/docroot/123 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/scripts/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ATTR_LIB = @ATTR_LIB@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +BZ_LIB = @BZ_LIB@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CRYPTO_LIB = @CRYPTO_LIB@ +CRYPT_LIB = @CRYPT_LIB@ +CYGPATH_W = @CYGPATH_W@ +DBI_CFLAGS = @DBI_CFLAGS@ +DBI_LIBS = @DBI_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIB = @DL_LIB@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FAM_CFLAGS = @FAM_CFLAGS@ +FAM_LIBS = @FAM_LIBS@ +FGREP = @FGREP@ +GDBM_LIB = @GDBM_LIB@ +GEOIP_LIB = @GEOIP_LIB@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5_LIB = @KRB5_LIB@ +LBER_LIB = @LBER_LIB@ +LD = @LD@ +LDAP_LIB = @LDAP_LIB@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBEV_CFLAGS = @LIBEV_CFLAGS@ +LIBEV_LIBS = @LIBEV_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LIBS = @LUA_LIBS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEMCACHED_LIB = @MEMCACHED_LIB@ +MKDIR_P = @MKDIR_P@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_CONFIG = @MYSQL_CONFIG@ +MYSQL_LIBS = @MYSQL_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_LIB = @PAM_LIB@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRECONFIG = @PCRECONFIG@ +PCRE_LIB = @PCRE_LIB@ +PGSQL_CONFIG = @PGSQL_CONFIG@ +PGSQL_INCLUDE = @PGSQL_INCLUDE@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SASL_CFLAGS = @SASL_CFLAGS@ +SASL_LIBS = @SASL_LIBS@ +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@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +Z_LIB = @Z_LIB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +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@ +builddir = @builddir@ +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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = 12345.html 12345.txt dummyfile.bla phpinfo.php +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/docroot/123/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/docroot/123/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__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# 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: diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/dummyfile.bla b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/dummyfile.bla new file mode 100644 index 000000000..e56e15bb7 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/dummyfile.bla @@ -0,0 +1 @@ +12345 diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/phpinfo.php b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/phpinfo.php new file mode 100644 index 000000000..147cebcdd --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/123/phpinfo.php @@ -0,0 +1 @@ +<?php phpinfo(); ?> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/Makefile.am b/data/lighttpd/lighttpd-1.4.53/tests/docroot/Makefile.am new file mode 100644 index 000000000..d14aa2885 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/Makefile.am @@ -0,0 +1 @@ +SUBDIRS=123 www diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/Makefile.in b/data/lighttpd/lighttpd-1.4.53/tests/docroot/Makefile.in new file mode 100644 index 000000000..f2b7fd046 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/Makefile.in @@ -0,0 +1,670 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 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@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +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@ +subdir = tests/docroot +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/scripts/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ATTR_LIB = @ATTR_LIB@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +BZ_LIB = @BZ_LIB@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CRYPTO_LIB = @CRYPTO_LIB@ +CRYPT_LIB = @CRYPT_LIB@ +CYGPATH_W = @CYGPATH_W@ +DBI_CFLAGS = @DBI_CFLAGS@ +DBI_LIBS = @DBI_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIB = @DL_LIB@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FAM_CFLAGS = @FAM_CFLAGS@ +FAM_LIBS = @FAM_LIBS@ +FGREP = @FGREP@ +GDBM_LIB = @GDBM_LIB@ +GEOIP_LIB = @GEOIP_LIB@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5_LIB = @KRB5_LIB@ +LBER_LIB = @LBER_LIB@ +LD = @LD@ +LDAP_LIB = @LDAP_LIB@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBEV_CFLAGS = @LIBEV_CFLAGS@ +LIBEV_LIBS = @LIBEV_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LIBS = @LUA_LIBS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEMCACHED_LIB = @MEMCACHED_LIB@ +MKDIR_P = @MKDIR_P@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_CONFIG = @MYSQL_CONFIG@ +MYSQL_LIBS = @MYSQL_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_LIB = @PAM_LIB@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRECONFIG = @PCRECONFIG@ +PCRE_LIB = @PCRE_LIB@ +PGSQL_CONFIG = @PGSQL_CONFIG@ +PGSQL_INCLUDE = @PGSQL_INCLUDE@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SASL_CFLAGS = @SASL_CFLAGS@ +SASL_LIBS = @SASL_LIBS@ +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@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +Z_LIB = @Z_LIB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +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@ +builddir = @builddir@ +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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = 123 www +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/docroot/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/docroot/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__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# 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. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + 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; \ + ($(am__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" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + 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 || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$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 \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +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: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# 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: diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/404.html b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/404.html new file mode 100644 index 000000000..ce72e8996 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/404.html @@ -0,0 +1 @@ +static not found diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/404.pl b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/404.pl new file mode 100755 index 000000000..5b5672cf1 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/404.pl @@ -0,0 +1,42 @@ +#!/usr/bin/env perl + +my $request_uri = $ENV{'REQUEST_URI'}; + +if ($request_uri =~ m/^\/dynamic\/200\// ) { + print "Status: 200\n", + "Content-Type: text/plain\n", + "\n", + "found here\n"; +} +elsif ($request_uri =~ m|^/dynamic/302/| ) { + print "Status: 302\n", + "Location: http://www.example.org/\n", + "\n"; +} +elsif ($request_uri =~ m/^\/dynamic\/404\// ) { + print "Status: 404\n", + "Content-Type: text/plain\n", + "\n", + "Not found here\n"; +} +elsif ($request_uri =~ m/^\/send404\.pl/ ) { + print "Status: 404\n", + "Content-Type: text/plain\n", + "\n", + "Not found here (send404)\n"; +} +elsif ($request_uri =~ m/^\/dynamic\/nostatus\// ) { + print ("found here\n"); +} +elsif ($request_uri =~ m/^\/dynamic\/redirect_status\// ) { + print "Status: $ENV{'REDIRECT_STATUS'}\n", + "Content-Type: text/plain\n", + "\n", + "REDIRECT_STATUS\n"; +} +else { + print "Status: 500\n", + "Content-Type: text/plain\n", + "\n", + "huh\n"; +}; diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/Makefile.am b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/Makefile.am new file mode 100644 index 000000000..1e2f6aef3 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/Makefile.am @@ -0,0 +1,28 @@ +EXTRA_DIST=\ + 404.html \ + 404.pl \ + cgi-pathinfo.pl \ + cgi.php \ + cgi.pl \ + crlfcrash.pl \ + exec-date.shtml \ + get-env.php \ + get-header.pl \ + get-post-len.pl \ + get-server-env.php \ + index.html \ + index.txt \ + ip.pl \ + nph-status.pl \ + phpinfo.php \ + prefix.fcgi \ + redirect.php \ + send404.pl \ + sendfile.php \ + ssi-include.shtml \ + ssi-include.txt \ + ssi.shtml +SUBDIRS=\ + expire \ + go \ + indexfile diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/Makefile.in b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/Makefile.in new file mode 100644 index 000000000..d080a247c --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/Makefile.in @@ -0,0 +1,699 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 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@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +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@ +subdir = tests/docroot/www +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/scripts/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ATTR_LIB = @ATTR_LIB@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +BZ_LIB = @BZ_LIB@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CRYPTO_LIB = @CRYPTO_LIB@ +CRYPT_LIB = @CRYPT_LIB@ +CYGPATH_W = @CYGPATH_W@ +DBI_CFLAGS = @DBI_CFLAGS@ +DBI_LIBS = @DBI_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIB = @DL_LIB@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FAM_CFLAGS = @FAM_CFLAGS@ +FAM_LIBS = @FAM_LIBS@ +FGREP = @FGREP@ +GDBM_LIB = @GDBM_LIB@ +GEOIP_LIB = @GEOIP_LIB@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5_LIB = @KRB5_LIB@ +LBER_LIB = @LBER_LIB@ +LD = @LD@ +LDAP_LIB = @LDAP_LIB@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBEV_CFLAGS = @LIBEV_CFLAGS@ +LIBEV_LIBS = @LIBEV_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LIBS = @LUA_LIBS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEMCACHED_LIB = @MEMCACHED_LIB@ +MKDIR_P = @MKDIR_P@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_CONFIG = @MYSQL_CONFIG@ +MYSQL_LIBS = @MYSQL_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_LIB = @PAM_LIB@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRECONFIG = @PCRECONFIG@ +PCRE_LIB = @PCRE_LIB@ +PGSQL_CONFIG = @PGSQL_CONFIG@ +PGSQL_INCLUDE = @PGSQL_INCLUDE@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SASL_CFLAGS = @SASL_CFLAGS@ +SASL_LIBS = @SASL_LIBS@ +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@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +Z_LIB = @Z_LIB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +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@ +builddir = @builddir@ +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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = \ + 404.html \ + 404.pl \ + cgi-pathinfo.pl \ + cgi.php \ + cgi.pl \ + crlfcrash.pl \ + exec-date.shtml \ + get-env.php \ + get-header.pl \ + get-post-len.pl \ + get-server-env.php \ + index.html \ + index.txt \ + ip.pl \ + nph-status.pl \ + phpinfo.php \ + prefix.fcgi \ + redirect.php \ + send404.pl \ + sendfile.php \ + ssi-include.shtml \ + ssi-include.txt \ + ssi.shtml + +SUBDIRS = \ + expire \ + go \ + indexfile + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/docroot/www/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/docroot/www/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__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# 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. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + 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; \ + ($(am__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" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + 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 || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$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 \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +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: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# 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: diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/cgi-pathinfo.pl b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/cgi-pathinfo.pl new file mode 100755 index 000000000..6b3a3355f --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/cgi-pathinfo.pl @@ -0,0 +1,7 @@ +#!/usr/bin/env perl + +print "Content-Type: text/html\r\n\r\n"; + +print $ENV{"PATH_INFO"}; + +0; diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/cgi.php b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/cgi.php new file mode 100755 index 000000000..f59a84019 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/cgi.php @@ -0,0 +1,9 @@ +<?php + +#ob_start(/*"ob_gzhandler"*/); +print "12345<br />\n"; +#phpinfo(); +#header("Content-Length: ".ob_get_length()); +#ob_end_flush(); + +?> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/cgi.pl b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/cgi.pl new file mode 100755 index 000000000..f7296f8b3 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/cgi.pl @@ -0,0 +1,12 @@ +#!/usr/bin/env perl + +if ($ENV{"QUERY_STRING"} eq "internal-redir") { + print "Location: /cgi-pathinfo.pl/foo\r\n\r\n"; + exit 0; +} + +print "Content-Type: text/html\r\n\r\n"; + +print $ENV{"SCRIPT_NAME"}; + +0; diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/crlfcrash.pl b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/crlfcrash.pl new file mode 100755 index 000000000..f90bc86c6 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/crlfcrash.pl @@ -0,0 +1,4 @@ +#!/usr/bin/env perl +# +print "Location: http://www.example.org/\r\n\n\n"; +exit; diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/exec-date.shtml b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/exec-date.shtml new file mode 100644 index 000000000..2c8535bc0 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/exec-date.shtml @@ -0,0 +1 @@ +<!--#exec cmd="expr 1 + 1"--> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/Makefile.am b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/Makefile.am new file mode 100644 index 000000000..7812b143c --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST=access.txt modification.txt diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/Makefile.in b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/Makefile.in new file mode 100644 index 000000000..e2c6b1e2d --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/Makefile.in @@ -0,0 +1,490 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 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@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +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@ +subdir = tests/docroot/www/expire +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/scripts/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ATTR_LIB = @ATTR_LIB@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +BZ_LIB = @BZ_LIB@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CRYPTO_LIB = @CRYPTO_LIB@ +CRYPT_LIB = @CRYPT_LIB@ +CYGPATH_W = @CYGPATH_W@ +DBI_CFLAGS = @DBI_CFLAGS@ +DBI_LIBS = @DBI_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIB = @DL_LIB@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FAM_CFLAGS = @FAM_CFLAGS@ +FAM_LIBS = @FAM_LIBS@ +FGREP = @FGREP@ +GDBM_LIB = @GDBM_LIB@ +GEOIP_LIB = @GEOIP_LIB@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5_LIB = @KRB5_LIB@ +LBER_LIB = @LBER_LIB@ +LD = @LD@ +LDAP_LIB = @LDAP_LIB@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBEV_CFLAGS = @LIBEV_CFLAGS@ +LIBEV_LIBS = @LIBEV_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LIBS = @LUA_LIBS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEMCACHED_LIB = @MEMCACHED_LIB@ +MKDIR_P = @MKDIR_P@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_CONFIG = @MYSQL_CONFIG@ +MYSQL_LIBS = @MYSQL_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_LIB = @PAM_LIB@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRECONFIG = @PCRECONFIG@ +PCRE_LIB = @PCRE_LIB@ +PGSQL_CONFIG = @PGSQL_CONFIG@ +PGSQL_INCLUDE = @PGSQL_INCLUDE@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SASL_CFLAGS = @SASL_CFLAGS@ +SASL_LIBS = @SASL_LIBS@ +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@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +Z_LIB = @Z_LIB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +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@ +builddir = @builddir@ +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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = access.txt modification.txt +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/docroot/www/expire/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/docroot/www/expire/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__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# 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: diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/access.txt b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/access.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/access.txt diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/modification.txt b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/modification.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/expire/modification.txt diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-env.php b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-env.php new file mode 100644 index 000000000..cd7fa0405 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-env.php @@ -0,0 +1,4 @@ +<?php + $env = $_GET["env"]; + print isset($_ENV[$env]) ? $_ENV[$env] : ''; +?> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-header.pl b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-header.pl new file mode 100755 index 000000000..1e19677d9 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-header.pl @@ -0,0 +1,8 @@ +#!/usr/bin/env perl + +my $s = $ENV{$ENV{"QUERY_STRING"}}; + +printf("Content-Length: %d\r\n", length($s)); +print "Content-Type: text/plain\r\n\r\n"; + +print $s; diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-post-len.pl b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-post-len.pl new file mode 100755 index 000000000..82276bd64 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-post-len.pl @@ -0,0 +1,13 @@ +#!/usr/bin/env perl + +print "Content-Type: text/plain\r\n\r\n"; + +if ($ENV{"REQUEST_METHOD"} eq "POST") { + my $l = 0; + while(<>) { + $l += length($_); + } + print $l; +} else { + print "0"; +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-server-env.php b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-server-env.php new file mode 100644 index 000000000..64d93124c --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/get-server-env.php @@ -0,0 +1,3 @@ +<?php + print $_SERVER[$_GET["env"]]; +?> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/go/Makefile.am b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/go/Makefile.am new file mode 100644 index 000000000..fe20c5036 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/go/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST=cgi.php diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/go/Makefile.in b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/go/Makefile.in new file mode 100644 index 000000000..eddf5fbc8 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/go/Makefile.in @@ -0,0 +1,490 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 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@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +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@ +subdir = tests/docroot/www/go +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/scripts/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ATTR_LIB = @ATTR_LIB@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +BZ_LIB = @BZ_LIB@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CRYPTO_LIB = @CRYPTO_LIB@ +CRYPT_LIB = @CRYPT_LIB@ +CYGPATH_W = @CYGPATH_W@ +DBI_CFLAGS = @DBI_CFLAGS@ +DBI_LIBS = @DBI_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIB = @DL_LIB@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FAM_CFLAGS = @FAM_CFLAGS@ +FAM_LIBS = @FAM_LIBS@ +FGREP = @FGREP@ +GDBM_LIB = @GDBM_LIB@ +GEOIP_LIB = @GEOIP_LIB@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5_LIB = @KRB5_LIB@ +LBER_LIB = @LBER_LIB@ +LD = @LD@ +LDAP_LIB = @LDAP_LIB@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBEV_CFLAGS = @LIBEV_CFLAGS@ +LIBEV_LIBS = @LIBEV_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LIBS = @LUA_LIBS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEMCACHED_LIB = @MEMCACHED_LIB@ +MKDIR_P = @MKDIR_P@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_CONFIG = @MYSQL_CONFIG@ +MYSQL_LIBS = @MYSQL_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_LIB = @PAM_LIB@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRECONFIG = @PCRECONFIG@ +PCRE_LIB = @PCRE_LIB@ +PGSQL_CONFIG = @PGSQL_CONFIG@ +PGSQL_INCLUDE = @PGSQL_INCLUDE@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SASL_CFLAGS = @SASL_CFLAGS@ +SASL_LIBS = @SASL_LIBS@ +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@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +Z_LIB = @Z_LIB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +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@ +builddir = @builddir@ +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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = cgi.php +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/docroot/www/go/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/docroot/www/go/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__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# 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: diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/go/cgi.php b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/go/cgi.php new file mode 100755 index 000000000..f59a84019 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/go/cgi.php @@ -0,0 +1,9 @@ +<?php + +#ob_start(/*"ob_gzhandler"*/); +print "12345<br />\n"; +#phpinfo(); +#header("Content-Length: ".ob_get_length()); +#ob_end_flush(); + +?> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/index.html b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/index.html new file mode 100644 index 000000000..3c1496715 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/index.html @@ -0,0 +1,113 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<HTML> +<HEAD> +<TITLE>Webserver testpage</TITLE> +<META content="iso-8859-1" http-equiv="charset"> +<META name="author" content="Christian Hofmann, SuSE Linux AG"> +</HEAD> +<BODY BGCOLOR="#ffffff" LINK="#669900" ALINK="#669900" VLINK="#fb8000" text=black marginwidth="0" marginheight="0" leftmargin="0" topmargin="0"> +<TABLE border="0" width="760" cellpadding="0" cellspacing="0"> + <TR> + <TD rowspan="4" bgcolor="#669900" width="50"> </TD> + <td valign=top height="70" width="29" bgcolor="#669900"> </td> + <td valign="middle" height="70" width="152" align="center" bgcolor="#669900"> </td> + <td valign=middle height="70" width="529" bgcolor="#669900"> + <div align="center"> + <font face="Courier New,Courier,mono" size="5" color="white"><B>+++ testinfo - webserver +++</b></font> + </div> + </td> + </tr> + <TR> + <td width="29" height="100" valign="middle" bgcolor="#669900"> </td> + <td width="152" height="100" align="center" valign="bottom"><IMG src="gif/penguin.gif" width=90 height=76 hspace=0 vspace=0 border=0 alt=" "></td> + <td width="529" height="100" valign="middle"> + <div align="center"> + <font face="Courier New,Courier,mono" size="3"><I>This is only a test page for the webserver!</I></font><br> + <font face="Courier New,Courier,mono" size="-1">SuSE is not responsible for the contents of this domain!</font> + </div> + </td> + </tr> + <tr> + <td valign=top align=left colspan="4"> + <table border="0" cellpadding="0" cellspacing="0" width="710" vspace="0" hspace="0"> + <TR> + <TD bgcolor="#669900" width="29" height="20"> </TD> + <TD width="152" height="20"> </TD> + <TD width="558" height="20" colspan="2"> </TD> + </tr> + <TR> + <TD height="50" align=left width="181" colspan="2"><IMG src="gif/sysinfo_en.png" width="181" height="50" border="0" alt="system information"></TD> + <TD width="529" colspan="2" rowspan="2" valign=top> + <FONT face="helvetica, arial, sans-serif"> + <B>Operating system:</B> [ SuSE Linux 8.0 (i386) + ]<BR> + <B>Host:</B> [ grisu.home.kneschke.de, Kernel: 2.4.18-4GB (i686) + ] + </FONT> + </TD> + </TR> + <TR> + <TD bgcolor="#669900" width="29" height="40"> </TD> + <TD width="181" height="40"> </TD> + </TR> + + <TR> + <TD height="50" align=left width="181" colspan="2"><IMG src="gif/version_en.png" width="181" height="50" border="0" alt="webserver and modules"></TD> + <TD width="529" colspan="2" rowspan="2" valign=top> + <FONT face="helvetica,arial,sans-serif"> + <B>Webserver version:</B><br> + [ lighttpd/0.1.0 (Unix) ]<br><br> + + <B>Installed modules:</B><br> + <I>[ PHP module is not installed ]</I><br> + <I>[ Apache perl module (mod_perl) is not installed ]</I><br> + <I>[ Apache DAV module (mod_dav) is not installed ]</I><br> + <I>[ Apache Python module (mod_python) is not installed ]</I><br> + + </FONT> + </TD> + </TR> + <TR> + <TD bgcolor="#669900" width="29" height="100"> </TD> + <TD width="181" height="100"> </TD> + </TR> + <TR> + <TD colspan="2" height="50" align=left width="181"><IMG src="gif/docu_en.png" width="181" height="50" border="0" alt="documentation"></TD> + <TD width="529" colspan="2" rowspan="2" valign=top> + <FONT face="helvetica,arial,sans-serif"> +<I>[ This host is not configured as server for the SuSE help system ]</I><br><br> +<I>[ Apache manual is not installed ]</I><br> + + <BR> + <A HREF="http://www.suse.de/">[ The SuSE website ]</A><BR> + + + + </FONT> + </TD> + + </TR> + <TR> + <TD bgcolor="#669900" width="29" height="90"> </TD> + <TD width="181" height="90"> </TD> + </Table> + </td> + </tr> + <tr> + <td width=29 bgcolor="#669900"> </td> + <td valign=bottom align=right width="681" colspan="3"><A HREF="http://www.suse.de/en/"><IMG src="gif/powered_by_suse.gif" alt="powered by SuSE" width=100 height=40 hspace=5 vspace=5 border=0></A></td> + </tr> + +</TABLE> +</BODY> +</HTML> + + + + + + + + + + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/index.txt b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/index.txt new file mode 100644 index 000000000..3c1496715 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/index.txt @@ -0,0 +1,113 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<HTML> +<HEAD> +<TITLE>Webserver testpage</TITLE> +<META content="iso-8859-1" http-equiv="charset"> +<META name="author" content="Christian Hofmann, SuSE Linux AG"> +</HEAD> +<BODY BGCOLOR="#ffffff" LINK="#669900" ALINK="#669900" VLINK="#fb8000" text=black marginwidth="0" marginheight="0" leftmargin="0" topmargin="0"> +<TABLE border="0" width="760" cellpadding="0" cellspacing="0"> + <TR> + <TD rowspan="4" bgcolor="#669900" width="50"> </TD> + <td valign=top height="70" width="29" bgcolor="#669900"> </td> + <td valign="middle" height="70" width="152" align="center" bgcolor="#669900"> </td> + <td valign=middle height="70" width="529" bgcolor="#669900"> + <div align="center"> + <font face="Courier New,Courier,mono" size="5" color="white"><B>+++ testinfo - webserver +++</b></font> + </div> + </td> + </tr> + <TR> + <td width="29" height="100" valign="middle" bgcolor="#669900"> </td> + <td width="152" height="100" align="center" valign="bottom"><IMG src="gif/penguin.gif" width=90 height=76 hspace=0 vspace=0 border=0 alt=" "></td> + <td width="529" height="100" valign="middle"> + <div align="center"> + <font face="Courier New,Courier,mono" size="3"><I>This is only a test page for the webserver!</I></font><br> + <font face="Courier New,Courier,mono" size="-1">SuSE is not responsible for the contents of this domain!</font> + </div> + </td> + </tr> + <tr> + <td valign=top align=left colspan="4"> + <table border="0" cellpadding="0" cellspacing="0" width="710" vspace="0" hspace="0"> + <TR> + <TD bgcolor="#669900" width="29" height="20"> </TD> + <TD width="152" height="20"> </TD> + <TD width="558" height="20" colspan="2"> </TD> + </tr> + <TR> + <TD height="50" align=left width="181" colspan="2"><IMG src="gif/sysinfo_en.png" width="181" height="50" border="0" alt="system information"></TD> + <TD width="529" colspan="2" rowspan="2" valign=top> + <FONT face="helvetica, arial, sans-serif"> + <B>Operating system:</B> [ SuSE Linux 8.0 (i386) + ]<BR> + <B>Host:</B> [ grisu.home.kneschke.de, Kernel: 2.4.18-4GB (i686) + ] + </FONT> + </TD> + </TR> + <TR> + <TD bgcolor="#669900" width="29" height="40"> </TD> + <TD width="181" height="40"> </TD> + </TR> + + <TR> + <TD height="50" align=left width="181" colspan="2"><IMG src="gif/version_en.png" width="181" height="50" border="0" alt="webserver and modules"></TD> + <TD width="529" colspan="2" rowspan="2" valign=top> + <FONT face="helvetica,arial,sans-serif"> + <B>Webserver version:</B><br> + [ lighttpd/0.1.0 (Unix) ]<br><br> + + <B>Installed modules:</B><br> + <I>[ PHP module is not installed ]</I><br> + <I>[ Apache perl module (mod_perl) is not installed ]</I><br> + <I>[ Apache DAV module (mod_dav) is not installed ]</I><br> + <I>[ Apache Python module (mod_python) is not installed ]</I><br> + + </FONT> + </TD> + </TR> + <TR> + <TD bgcolor="#669900" width="29" height="100"> </TD> + <TD width="181" height="100"> </TD> + </TR> + <TR> + <TD colspan="2" height="50" align=left width="181"><IMG src="gif/docu_en.png" width="181" height="50" border="0" alt="documentation"></TD> + <TD width="529" colspan="2" rowspan="2" valign=top> + <FONT face="helvetica,arial,sans-serif"> +<I>[ This host is not configured as server for the SuSE help system ]</I><br><br> +<I>[ Apache manual is not installed ]</I><br> + + <BR> + <A HREF="http://www.suse.de/">[ The SuSE website ]</A><BR> + + + + </FONT> + </TD> + + </TR> + <TR> + <TD bgcolor="#669900" width="29" height="90"> </TD> + <TD width="181" height="90"> </TD> + </Table> + </td> + </tr> + <tr> + <td width=29 bgcolor="#669900"> </td> + <td valign=bottom align=right width="681" colspan="3"><A HREF="http://www.suse.de/en/"><IMG src="gif/powered_by_suse.gif" alt="powered by SuSE" width=100 height=40 hspace=5 vspace=5 border=0></A></td> + </tr> + +</TABLE> +</BODY> +</HTML> + + + + + + + + + + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/Makefile.am b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/Makefile.am new file mode 100644 index 000000000..333c0c56a --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST=index.php return-404.php query_string.pl diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/Makefile.in b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/Makefile.in new file mode 100644 index 000000000..dbb8093c9 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/Makefile.in @@ -0,0 +1,490 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 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@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +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@ +subdir = tests/docroot/www/indexfile +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/scripts/m4/ax_prog_cc_for_build.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ATTR_LIB = @ATTR_LIB@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_EXEEXT = @BUILD_EXEEXT@ +BUILD_OBJEXT = @BUILD_OBJEXT@ +BZ_LIB = @BZ_LIB@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS = @CFLAGS@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CRYPTO_LIB = @CRYPTO_LIB@ +CRYPT_LIB = @CRYPT_LIB@ +CYGPATH_W = @CYGPATH_W@ +DBI_CFLAGS = @DBI_CFLAGS@ +DBI_LIBS = @DBI_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIB = @DL_LIB@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FAM_CFLAGS = @FAM_CFLAGS@ +FAM_LIBS = @FAM_LIBS@ +FGREP = @FGREP@ +GDBM_LIB = @GDBM_LIB@ +GEOIP_LIB = @GEOIP_LIB@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +KRB5_LIB = @KRB5_LIB@ +LBER_LIB = @LBER_LIB@ +LD = @LD@ +LDAP_LIB = @LDAP_LIB@ +LDFLAGS = @LDFLAGS@ +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ +LIBEV_CFLAGS = @LIBEV_CFLAGS@ +LIBEV_LIBS = @LIBEV_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ +LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA_CFLAGS = @LUA_CFLAGS@ +LUA_LIBS = @LUA_LIBS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MEMCACHED_LIB = @MEMCACHED_LIB@ +MKDIR_P = @MKDIR_P@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_CONFIG = @MYSQL_CONFIG@ +MYSQL_LIBS = @MYSQL_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_LIB = @PAM_LIB@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRECONFIG = @PCRECONFIG@ +PCRE_LIB = @PCRE_LIB@ +PGSQL_CONFIG = @PGSQL_CONFIG@ +PGSQL_INCLUDE = @PGSQL_INCLUDE@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SASL_CFLAGS = @SASL_CFLAGS@ +SASL_LIBS = @SASL_LIBS@ +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@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +XML_CFLAGS = @XML_CFLAGS@ +XML_LIBS = @XML_LIBS@ +Z_LIB = @Z_LIB@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +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@ +builddir = @builddir@ +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@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = index.php return-404.php query_string.pl +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/docroot/www/indexfile/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign tests/docroot/www/indexfile/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__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# 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: diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/index.php b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/index.php new file mode 100644 index 000000000..e0c7d9ecb --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/index.php @@ -0,0 +1 @@ +<?php print $_SERVER["PHP_SELF"]; ?> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/query_string.pl b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/query_string.pl new file mode 100755 index 000000000..b775f6f6c --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/query_string.pl @@ -0,0 +1,3 @@ +#!/usr/bin/env perl + +print "Status: 200\n\n$ENV{QUERY_STRING}" diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/return-404.php b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/return-404.php new file mode 100644 index 000000000..2adaaeaa9 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/indexfile/return-404.php @@ -0,0 +1,5 @@ +<?php + header("Status: 404"); + + print $_SERVER["PHP_SELF"]; +?> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ip.pl b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ip.pl new file mode 100755 index 000000000..fa56ddcf4 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ip.pl @@ -0,0 +1,13 @@ +#!/usr/bin/env perl +print "Content-Type: text/html\r\n\r\n"; +print $ENV{'REMOTE_ADDR'}; + +if ($ENV{'QUERY_STRING'} eq 'info') { + print "\nF:",$ENV{'HTTP_X_FORWARDED_FOR'},"\n"; + + while (my($key, $value) = each %ENV) { + printf "%s => %s\n", $key, $value; + } +} + +0; diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/nph-status.pl b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/nph-status.pl new file mode 100755 index 000000000..b42da7417 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/nph-status.pl @@ -0,0 +1,10 @@ +#!/usr/bin/env perl + +my $status = 200; + +if (defined $ENV{"QUERY_STRING"}) { + $status = $ENV{"QUERY_STRING"}; +} + +print "HTTP/1.0 ".$status." FooBar\r\n"; +print "\r\n"; diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/phpinfo.php b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/phpinfo.php new file mode 100644 index 000000000..147cebcdd --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/phpinfo.php @@ -0,0 +1 @@ +<?php phpinfo(); ?> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/prefix.fcgi b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/prefix.fcgi new file mode 100644 index 000000000..e38835207 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/prefix.fcgi @@ -0,0 +1,3 @@ +<?php +echo $_SERVER[$_GET["var"]]; +?> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/redirect.php b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/redirect.php new file mode 100644 index 000000000..0489d22dd --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/redirect.php @@ -0,0 +1,4 @@ +<?php + + header('Location: http://www.example.org:2048/'); +?> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/send404.pl b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/send404.pl new file mode 100755 index 000000000..45c619a79 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/send404.pl @@ -0,0 +1,6 @@ +#!/usr/bin/env perl + +print "Status: 404\n", + "Content-Type: text/plain\n", + "\n", + "send404\n"; diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/sendfile.php b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/sendfile.php new file mode 100644 index 000000000..e46022034 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/sendfile.php @@ -0,0 +1,13 @@ +<?php + +function pathencode($path) { + return str_replace(',', '%2c', urlencode($path)); +} + +$val = "X-Sendfile2: " . pathencode(getcwd() . "/index.txt") . " " . $_GET["range"]; + +if (isset($_GET["range2"])) $val .= ", " . pathencode(getcwd() . "/index.txt") . " " . $_GET["range2"]; + +header($val); + +?>
\ No newline at end of file diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ssi-include.shtml b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ssi-include.shtml new file mode 100644 index 000000000..317c6e3a7 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ssi-include.shtml @@ -0,0 +1,5 @@ +<!--#echo var=SCRIPT_NAME--> +<!--#echo var='SCRIPT_NAME'--> +<!--#echo var="SCRIPT_NAME"--> +<!--#include virtual="ssi-include.txt" --> +<!--#include file="ssi-include.txt" --> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ssi-include.txt b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ssi-include.txt new file mode 100644 index 000000000..3ea09a824 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ssi-include.txt @@ -0,0 +1 @@ +ssi-include diff --git a/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ssi.shtml b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ssi.shtml new file mode 100644 index 000000000..473c5c658 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/docroot/www/ssi.shtml @@ -0,0 +1 @@ +<!--#echo var="SCRIPT_NAME" --> diff --git a/data/lighttpd/lighttpd-1.4.53/tests/fastcgi-10.conf b/data/lighttpd/lighttpd-1.4.53/tests/fastcgi-10.conf new file mode 100644 index 000000000..df5a7880d --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/fastcgi-10.conf @@ -0,0 +1,67 @@ +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +## 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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" +server.tag = "Apache 1.3.29" + +server.modules = ( + "mod_auth", + "mod_authn_file", + "mod_fastcgi", + "mod_accesslog", +) + +server.indexfiles = ( + "index.php", + "index.html", +) + +accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log" + +fastcgi.debug = 0 +fastcgi.server = ( + ".php" => ( ( + "host" => "127.0.0.1", + "port" => 1026, + "bin-path" => env.PHP, + "bin-copy-environment" => ( "PATH", "SHELL", "USER", ), + "allow-x-send-file" => "enable", + ) ), + "/prefix.fcgi" => ( ( + "host" => "127.0.0.1", + "port" => 1026, + "bin-path" => env.PHP, + "bin-copy-environment" => ( "PATH", "SHELL", "USER", ), + ) ), +) + +server.error-handler-404 = "/indexfile/return-404.php" + +$HTTP["host"] == "zzz.example.org" { + server.name = "zzz.example.org" +} + +$HTTP["host"] == "auth.example.org" { + server.name = "auth.example.org" + auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd" + auth.backend = "htpasswd" + auth.require = ( + "" => ( + "method" => "basic", + "realm" => "download archiv", + "require" => "valid-user", + ), + ) +} + +$HTTP["host"] == "www.example.org" { + $HTTP["url"] == "/go/" { + server.indexfiles = ( "cgi.php" ) + } +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/fastcgi-responder.conf b/data/lighttpd/lighttpd-1.4.53/tests/fastcgi-responder.conf new file mode 100644 index 000000000..705c3cacf --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/fastcgi-responder.conf @@ -0,0 +1,84 @@ +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +debug.log-request-header = "enable" +debug.log-response-header = "enable" +debug.log-request-handling = "enable" + +## 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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" +server.tag = "Apache 1.3.29" + +server.modules = ( + "mod_fastcgi", + "mod_accesslog", +) + +server.indexfiles = ( + "index.php", + "index.html", +) + +accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log" + +$HTTP["host"] == "auth.example.org" { + +fastcgi.debug = 0 +fastcgi.server = ( + "/" => ( + "grisu-auth" => ( + "host" => "127.0.0.1", + "port" => 20000, + "bin-path" => env.SRCDIR + "/fcgi-auth", + "mode" => "authorizer", + "check-local" => "disable", + ), + "grisu-resp" => ( + "host" => "127.0.0.1", + "port" => 10000, + "bin-path" => env.SRCDIR + "/fcgi-responder", + "check-local" => "disable", + "max-procs" => 1, + ), + ), +) + +} +else { + +fastcgi.debug = 0 +fastcgi.server = ( + ".fcgi" => ( + "grisu" => ( + "host" => "127.0.0.1", + "port" => 10000, + "bin-path" => env.SRCDIR + "/fcgi-responder", + "check-local" => "disable", + "max-procs" => 1, + "min-procs" => 1, + ), + ), +) + +} + +$HTTP["host"] == "zzz.example.org" { + server.name = "zzz.example.org" +} + +$HTTP["host"] == "wsgi.example.org" { + fastcgi.server = ( + "/" => ( ( + "host" => "127.0.0.1", "port" => 10000, + "fix-root-scriptname" => "enable", + "check-local" => "disable", + "bin-path" => env.SRCDIR + "/fcgi-responder", + "max-procs" => 1, + ) ), + ) +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/fcgi-auth.c b/data/lighttpd/lighttpd-1.4.53/tests/fcgi-auth.c new file mode 100644 index 000000000..3c7cdfdc0 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/fcgi-auth.c @@ -0,0 +1,30 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef HAVE_FASTCGI_FASTCGI_H +#include <fastcgi/fcgi_stdio.h> +#else +#include <fcgi_stdio.h> +#endif +#include <stdlib.h> +#include <string.h> + +int main (void) { + + while (FCGI_Accept() >= 0) { + + /* Status: 200 OK to allow access is implied + * if Status header is not included in response */ + + char *p = getenv("QUERY_STRING"); + if (p != NULL && 0 == strcmp(p, "var")) { + printf("Variable-X-LIGHTTPD-FCGI-AUTH: LighttpdTestContent\r\n"); + } else if (p == NULL || 0 != strcmp(p, "ok")) { + printf("Status: 403 Forbidden\r\n"); + } + + printf("\r\n"); + } + + return 0; +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/fcgi-responder.c b/data/lighttpd/lighttpd-1.4.53/tests/fcgi-responder.c new file mode 100644 index 000000000..d04bc32ed --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/fcgi-responder.c @@ -0,0 +1,58 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef HAVE_FASTCGI_FASTCGI_H +#include <fastcgi/fcgi_stdio.h> +#else +#include <fcgi_stdio.h> +#endif +#include <stdlib.h> +#include <unistd.h> +#include <string.h> + +int main (void) { + int num_requests = 1; + + while (num_requests > 0 && + FCGI_Accept() >= 0) { + char* p; + + if (NULL != (p = getenv("QUERY_STRING"))) { + if (0 == strcmp(p, "lf")) { + printf("Status: 200 OK\n\n"); + } else if (0 == strcmp(p, "crlf")) { + printf("Status: 200 OK\r\n\r\n"); + } else if (0 == strcmp(p, "slow-lf")) { + printf("Status: 200 OK\n"); + fflush(stdout); + printf("\n"); + } else if (0 == strcmp(p,"slow-crlf")) { + printf("Status: 200 OK\r\n"); + fflush(stdout); + printf("\r\n"); + } else if (0 == strcmp(p, "die-at-end")) { + printf("Status: 200 OK\r\n\r\n"); + num_requests--; + } else { + printf("Status: 200 OK\r\n\r\n"); + } + } else { + printf("Status: 500 Internal Foo\r\n\r\n"); + } + + if (0 == strcmp(p, "path_info")) { + printf("%s", getenv("PATH_INFO")); + } else if (0 == strcmp(p, "script_name")) { + printf("%s", getenv("SCRIPT_NAME")); + } else if (0 == strcmp(p, "var")) { + p = getenv("X_LIGHTTPD_FCGI_AUTH"); + printf("%s", p ? p : "(no value)"); + } else { + printf("test123"); + } + + if (0 == num_requests) FCGI_Finish(); + } + + return 0; +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/lighttpd.conf b/data/lighttpd/lighttpd-1.4.53/tests/lighttpd.conf new file mode 100644 index 000000000..4c8f9677f --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/lighttpd.conf @@ -0,0 +1,174 @@ +debug.log-request-handling = "enable" +debug.log-request-header = "enable" +debug.log-response-header = "enable" +#debug.log-condition-handling = "enable" +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +## 64 Mbyte ... nice limit +server.max-request-size = 65000 + +## 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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" +server.tag = "Apache 1.3.29" + +server.dir-listing = "enable" + +server.modules = ( + "mod_setenv", + "mod_access", + "mod_expire", + "mod_simple_vhost", + "mod_cgi", + "mod_userdir", + "mod_ssi", + "mod_accesslog", +) + +server.indexfiles = ( + "index.html", +) + +ssi.extension = ( + ".shtml", +) + +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", +) + +setenv.add-environment = ( + "TRAC_ENV" => "tracenv", + "SETENV" => "setenv", +) +setenv.set-environment = ( + "NEWENV" => "newenv", +) +setenv.add-request-header = ( + "FOO" => "foo", +) +setenv.set-request-header = ( + "FOO2" => "foo2", +) +setenv.add-response-header = ( + "BAR" => "foo", +) +setenv.set-response-header = ( + "BAR2" => "bar2", +) + +$HTTP["url"] =~ "\.pdf$" { + server.range-requests = "disable" +} + +cgi.local-redir = "enable" +cgi.assign = ( + ".pl" => env.PERL, + ".cgi" => env.PERL, +) + +userdir.include-user = ( + "jan", +) +userdir.path = "/" + +url.access-deny = ( + "~", + ".inc", +) + +expire.url = ( + "/expire/access" => "access 2 hours", + "/expire/modification" => "access plus 1 seconds 2 minutes", +) + +$HTTP["host"] == "zzz.example.org" { + server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + server.name = "zzz.example.org" + static-file.disable-pathinfo = "enable" +} + +$HTTP["host"] == "symlink.example.org" { + server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + server.name = "symlink.example.org" + server.follow-symlink = "enable" +} + +$HTTP["host"] == "nosymlink.example.org" { + server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + server.name = "symlink.example.org" + server.follow-symlink = "disable" +} + +$HTTP["host"] == "no-simple.example.org" { + server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/" + server.name = "zzz.example.org" +} + +$HTTP["host"] !~ "(no-simple\.example\.org)" { + simple-vhost.document-root = "pages" + simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/" + simple-vhost.default-host = "www.example.org" +} + +$HTTP["host"] =~ "bug255\.example\.org$" { + $HTTP["remoteip"] == "127.0.0.1" { + url.access-deny = ( + "", + ) + } +} + +$HTTP["referer"] !~ "^($|http://referer\.example\.org)" { + url.access-deny = ( + ".jpg", + ) +} + +# deny access for all image stealers +$HTTP["host"] == "referer.example.org" { + $HTTP["referer"] !~ "^($|http://referer\.example\.org)" { + url.access-deny = ( + ".png", + ) + } +} + +$HTTP["cookie"] =~ "empty-ref" { + $HTTP["referer"] == "" { + url.access-deny = ( + "", + ) + } +} + +$HTTP["host"] =~ "allow\.example\.org$" { + url.access-allow = ( ".txt" ) # allow takes precedence over deny + url.access-deny = ( ".txt" ) +} + +$HTTP["host"] == "etag.example.org" { + static-file.etags = "disable" + compress.filetype = () +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/lighttpd.htpasswd b/data/lighttpd/lighttpd-1.4.53/tests/lighttpd.htpasswd new file mode 100644 index 000000000..87338c106 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/lighttpd.htpasswd @@ -0,0 +1,6 @@ +# some comment +des:12tMnfw882VDQ + +md5:$1$md5$kIa7Juuiv8zja0ILQPR36/ +sha:{SHA}2PRZAyDhNDqRW2OUFwZQqPNdaSY= +apr-md5:$apr1$w2kLqmDN$uMe8ZCfMRT81wf43Y1hny0 diff --git a/data/lighttpd/lighttpd-1.4.53/tests/lighttpd.user b/data/lighttpd/lighttpd-1.4.53/tests/lighttpd.user new file mode 100644 index 000000000..020aedc63 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/lighttpd.user @@ -0,0 +1 @@ +jan:jan diff --git a/data/lighttpd/lighttpd-1.4.53/tests/lowercase.conf b/data/lighttpd/lighttpd-1.4.53/tests/lowercase.conf new file mode 100644 index 000000000..b8f2ec7d4 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/lowercase.conf @@ -0,0 +1,46 @@ +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +## 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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" + +server.force-lowercase-filenames = "enable" + +server.modules = ( + "mod_access", + "mod_auth", + "mod_authn_file", +) + +mimetype.assign = ( + ".jpg" => "image/jpeg", +) + +auth.backend = "plain" +auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user" + +$HTTP["host"] == "lowercase-auth" { + auth.require = ( + "/image.jpg" => ( + "method" => "digest", + "realm" => "download archiv", + "require" => "valid-user", + ), + ) +} + +$HTTP["host"] == "lowercase-deny" { + url.access-deny = ( + ".jpg", + ) +} + +$HTTP["host"] == "lowercase-exclude" { + static-file.exclude-extensions = ( + ".jpg", + ) +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/lowercase.t b/data/lighttpd/lighttpd-1.4.53/tests/lowercase.t new file mode 100755 index 000000000..f6f6f2c4c --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/lowercase.t @@ -0,0 +1,94 @@ +#!/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 => 10; +use LightyTest; + +my $tf = LightyTest->new(); +my $t; + +$tf->{CONFIGFILE} = 'lowercase.conf'; + +ok($tf->start_proc == 0, "Starting lighttpd") or die(); + +## check if lower-casing works + +$t->{REQUEST} = ( <<EOF +GET /image.JPG HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'uppercase access'); + +$t->{REQUEST} = ( <<EOF +GET /image.jpg HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'lowercase access'); + +## check that mod-auth works + +$t->{REQUEST} = ( <<EOF +GET /image.JPG HTTP/1.0 +Host: lowercase-auth +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401 } ]; +ok($tf->handle_http($t) == 0, 'uppercase access'); + +$t->{REQUEST} = ( <<EOF +GET /image.jpg HTTP/1.0 +Host: lowercase-auth +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401 } ]; +ok($tf->handle_http($t) == 0, 'lowercase access'); + + +## check that mod-staticfile exclude works +$t->{REQUEST} = ( <<EOF +GET /image.JPG HTTP/1.0 +Host: lowercase-exclude +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; +ok($tf->handle_http($t) == 0, 'upper case access to staticfile.exclude-extension'); + +$t->{REQUEST} = ( <<EOF +GET /image.jpg HTTP/1.0 +Host: lowercase-exclude +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; +ok($tf->handle_http($t) == 0, 'lowercase access'); + + +## check that mod-access exclude works +$t->{REQUEST} = ( <<EOF +GET /image.JPG HTTP/1.0 +Host: lowercase-deny +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; +ok($tf->handle_http($t) == 0, 'uppercase access to url.access-deny protected location'); + +$t->{REQUEST} = ( <<EOF +GET /image.jpg HTTP/1.0 +Host: lowercase-deny +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; +ok($tf->handle_http($t) == 0, 'lowercase access'); + + + +ok($tf->stop_proc == 0, "Stopping lighttpd"); + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/meson.build b/data/lighttpd/lighttpd-1.4.53/tests/meson.build new file mode 100644 index 000000000..388b954ae --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/meson.build @@ -0,0 +1,52 @@ +if conf_data.get('HAVE_FASTCGI_H') or conf_data.get('HAVE_FASTCGI_FASTCGI_H') + libfcgi = compiler.find_library('fcgi', required: false) + if libfcgi.found() + executable('fcgi-auth', + sources: 'fcgi-auth.c', + dependencies: common_flags + [ libfcgi ], + ) + executable('fcgi-responder', + sources: 'fcgi-responder.c', + dependencies: common_flags + [ libfcgi ], + ) + endif +endif + +executable('scgi-responder', + sources: 'scgi-responder.c', + dependencies: common_flags, +) + +env = environment() +env.set('srcdir', meson.current_source_dir()) +env.set('top_builddir', meson.build_root()) + +tests = [ + 'cachable.t', + 'core-404-handler.t', + 'core-condition.t', + 'core-keepalive.t', + 'core-request.t', + 'core-response.t', + 'core-var-include.t', + 'lowercase.t', + 'mod-auth.t', + 'mod-cgi.t', + 'mod-compress.t', + 'mod-extforward.t', + 'mod-fastcgi.t', + 'mod-proxy.t', + 'mod-secdownload.t', + 'mod-setenv.t', + 'mod-ssi.t', + 'mod-userdir.t', + 'request.t', + 'symlink.t', +] + +# just hope it will run the tests in the given order +test('prepare', find_program('./prepare.sh'), env: env, is_parallel: false) +foreach t: tests + test(t, find_program('./' + t), env: env, is_parallel: false) +endforeach +test('cleanup', find_program('./cleanup.sh'), env: env, is_parallel: false) diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-auth.conf b/data/lighttpd/lighttpd-1.4.53/tests/mod-auth.conf new file mode 100644 index 000000000..a2846bf3a --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-auth.conf @@ -0,0 +1,49 @@ +debug.log-request-handling = "enable" +debug.log-request-header = "enable" +debug.log-response-header = "enable" + +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +## 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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" +server.tag = "Apache 1.3.29" + +server.modules = ( + "mod_auth", + "mod_authn_file", + "mod_status", + "mod_accesslog", +) + +accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log" + +$HTTP["host"] == "auth-htpasswd.example.org" { + auth.backend = "htpasswd" +} + +auth.backend = "plain" +auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user" + +auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd" + +auth.require = ( + "/server-status" => ( + "method" => "digest", + "realm" => "download archiv", + "require" => "group=www|user=jan|host=192.168.2.10", + ), + "/server-config" => ( + "method" => "basic", + "realm" => "download archiv", + "require" => "valid-user", + ), +) + +status.status-url = "/server-status" +status.config-url = "/server-config" diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-auth.t b/data/lighttpd/lighttpd-1.4.53/tests/mod-auth.t new file mode 100755 index 000000000..55719b113 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-auth.t @@ -0,0 +1,198 @@ +#!/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 => 20; +use LightyTest; + +my $tf = LightyTest->new(); +my $t; + +$tf->{CONFIGFILE} = 'mod-auth.conf'; +ok($tf->start_proc == 0, "Starting lighttpd") or die(); + +$t->{REQUEST} = ( <<EOF +GET /server-status HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401 } ]; +ok($tf->handle_http($t) == 0, 'Missing Auth-token'); + +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Authorization: Basic \x80mFuOmphb +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Invalid base64 Auth-token'); + +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Authorization: Basic bm90Oml0Cg== +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Wrong Auth-token'); + +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Authorization: Basic amFuOmphbg== +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - plain'); + +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Host: auth-htpasswd.example.org +Authorization: Basic ZGVzOmRlcw== +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (des)'); + +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Host: auth-htpasswd.example.org +Authorization: basic ZGVzOmRlcw== +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (des) (lowercase)'); + +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Host: auth-htpasswd.example.org +Authorization: Basic c2hhOnNoYQ== +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (sha)'); + +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Host: auth-htpasswd.example.org +Authorization: Basic c2hhOnNoYg== +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (sha, wrong password)'); + +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Host: auth-htpasswd.example.org +Authorization: Basic YXByLW1kNTphcHItbWQ1 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (apr-md5)'); + +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Host: auth-htpasswd.example.org +Authorization: Basic YXByLW1kNTphcHItbWQ2 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (apr-md5, wrong password)'); + +SKIP: { + skip "no crypt-md5 under cygwin", 1 if $^O eq 'cygwin'; + skip "no crypt-md5 under darwin", 1 if $^O eq 'darwin'; +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Host: auth-htpasswd.example.org +Authorization: Basic bWQ1Om1kNQ== +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (crypt-md5)'); +} + +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Authorization: Basic bWQ1Om1kNA== +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token'); + +## this should not crash +$t->{REQUEST} = ( <<EOF +GET /server-status HTTP/1.0 +User-Agent: Wget/1.9.1 +Authorization: Digest username="jan", realm="jan", nonce="9a5428ccc05b086a08d918e73b01fc6f", + uri="/server-status", response="ea5f7d9a30b8b762f9610ccb87dea74f" +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401 } ]; +ok($tf->handle_http($t) == 0, 'Digest-Auth: missing qop, no crash'); + +# (Note: test case is invalid; mismatch between request line and uri="..." +# is not what is intended to be tested here, but that is what is invalid) +# https://redmine.lighttpd.net/issues/477 +## this should not crash +$t->{REQUEST} = ( <<EOF +GET /server-status HTTP/1.0 +User-Agent: Wget/1.9.1 +Authorization: Digest username="jan", realm="jan", + nonce="b1d12348b4620437c43dd61c50ae4639", + uri="/MJ-BONG.xm.mpc", qop=auth, noncecount=00000001", + cnonce="036FCA5B86F7E7C4965C7F9B8FE714B7", + response="29B32C2953C763C6D033C8A49983B87E" +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; +ok($tf->handle_http($t) == 0, 'Digest-Auth: missing nc (noncecount instead), no crash'); + +$t->{REQUEST} = ( <<EOF +GET /server-config HTTP/1.0 +Authorization: Basic = +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; +ok($tf->handle_http($t) == 0, 'Basic-Auth: Invalid Base64'); + +$t->{REQUEST} = ( <<EOF +GET /server-status HTTP/1.0 +Authorization: Digest username="jan", realm="download archiv", + nonce="b3b26457000000003a9b34a3cd56d26e48a52a498ac9765d4b", + uri="/server-status", qop=auth, nc=00000001, + algorithm="md5-sess", response="049b000fb00ab51dddea6f093a96aa2e" +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; +ok($tf->handle_http($t) == 0, 'Digest-Auth: md5-sess + missing cnonce'); + + $t->{REQUEST} = ( <<EOF +GET /server-status HTTP/1.0 +Authorization: Digest username="jan", realm="download archiv", + nonce="b3b26457000000003a9b34a3cd56d26e48a52a498ac9765d4b", + uri="/server-status", qop=auth, nc=00000001, cnonce="65ee1b37", + algorithm="md5", response="049b000fb00ab51dddea6f093a96aa2e" +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401, 'WWW-Authenticate' => '/, stale=true$/' } ]; +ok($tf->handle_http($t) == 0, 'Digest-Auth: stale nonce'); + +$t->{REQUEST} = ( <<EOF +GET /server-status HTTP/1.0 +Authorization: Digest username="jan", realm="download archiv", + nonce="b3b26457000000003a9b34a3cd56d26e48a52a498ac9765d4b", + uri="/server-status", qop=auth, nc=00000001, cnonce="65ee1b37", + algorithm="md5", response="049b000fb00ab51dddea6f093a96aa2e" +EOF + ); # note: trailing whitespace at end of request line above is intentional +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 401, 'WWW-Authenticate' => '/, stale=true$/' } ]; +ok($tf->handle_http($t) == 0, 'Digest-Auth: trailing WS, stale nonce'); + + + +ok($tf->stop_proc == 0, "Stopping lighttpd"); + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-cgi.t b/data/lighttpd/lighttpd-1.4.53/tests/mod-cgi.t new file mode 100755 index 000000000..b3e306ca2 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-cgi.t @@ -0,0 +1,125 @@ +#!/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 => 16; +use LightyTest; + +my $tf = LightyTest->new(); +my $t; + +ok($tf->start_proc == 0, "Starting lighttpd") or die(); + +# mod-cgi +# +$t->{REQUEST} = ( <<EOF +GET /cgi.pl HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'perl via cgi'); + +$t->{REQUEST} = ( <<EOF +GET /cgi.pl/foo HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/cgi.pl' } ]; +ok($tf->handle_http($t) == 0, 'perl via cgi + pathinfo'); + +$t->{REQUEST} = ( <<EOF +GET /cgi.pl?internal-redir HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'perl via cgi and internal redirect from CGI'); + +$t->{REQUEST} = ( <<EOF +GET /cgi-pathinfo.pl/foo HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/foo' } ]; +ok($tf->handle_http($t) == 0, 'perl via cgi + pathinfo'); + +$t->{REQUEST} = ( <<EOF +GET /nph-status.pl?30 HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 502 } ]; +ok($tf->handle_http($t) == 0, 'NPH + perl, invalid status-code (#14)'); + +$t->{REQUEST} = ( <<EOF +GET /nph-status.pl?304 HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; +ok($tf->handle_http($t) == 0, 'NPH + perl, setting status-code (#1125)'); + +$t->{REQUEST} = ( <<EOF +GET /nph-status.pl?200 HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'NPH + perl, setting status-code'); + +$t->{REQUEST} = ( <<EOF +GET /get-header.pl?GATEWAY_INTERFACE HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'CGI/1.1' } ]; +ok($tf->handle_http($t) == 0, 'cgi-env: GATEWAY_INTERFACE'); + +$t->{REQUEST} = ( <<EOF +GET /get-header.pl?QUERY_STRING HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'QUERY_STRING' } ]; +ok($tf->handle_http($t) == 0, 'cgi-env: QUERY_STRING'); + +$t->{REQUEST} = ( <<EOF +GET /get-header.pl?GATEWAY_INTERFACE HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'CGI/1.1' } ]; +ok($tf->handle_http($t) == 0, 'cgi-env: GATEWAY_INTERFACE'); + +$t->{REQUEST} = ( <<EOF +GET /get-header.pl?HTTP_XX_YY123 HTTP/1.0 +xx-yy123: foo +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'foo' } ]; +ok($tf->handle_http($t) == 0, 'cgi-env: quoting headers with numbers'); + +$t->{REQUEST} = ( <<EOF +GET /get-header.pl?HTTP_HOST HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'www.example.org', 'Content-Type' => 'text/plain' } ]; +ok($tf->handle_http($t) == 0, 'cgi-env: HTTP_HOST'); + +$t->{REQUEST} = ( <<EOF +GET /get-header.pl?HTTP_HOST HTTP/1.1 +Host: www.example.org +Connection: close +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, '+Content-Length' => '' } ]; +ok($tf->handle_http($t) == 0, 'cgi-env: HTTP_HOST'); + +# broken header crash +$t->{REQUEST} = ( <<EOF +GET /crlfcrash.pl 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, 'broken header via perl cgi'); + +ok($tf->stop_proc == 0, "Stopping lighttpd"); + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-compress.conf b/data/lighttpd/lighttpd-1.4.53/tests/mod-compress.conf new file mode 100644 index 000000000..684bec90f --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-compress.conf @@ -0,0 +1,38 @@ +debug.log-request-handling = "enable" +debug.log-response-header = "disable" +debug.log-request-header = "disable" + +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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" + +server.modules = ( + "mod_compress", +) + +mimetype.assign = ( + ".html" => "text/html", + ".txt" => "text/plain; charset=utf-8", +) + +$HTTP["host"] == "cache.example.org" { + compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/" +} + +compress.filetype = ( + "text/plain", + "text/html", +) + +compress.allowed-encodings = ( + "gzip", + "deflate", +) diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-compress.t b/data/lighttpd/lighttpd-1.4.53/tests/mod-compress.t new file mode 100755 index 000000000..966f6130b --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-compress.t @@ -0,0 +1,103 @@ +#!/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 => 11; +use LightyTest; + +my $tf = LightyTest->new(); +my $t; + +$tf->{CONFIGFILE} = 'mod-compress.conf'; + +ok($tf->start_proc == 0, "Starting lighttpd") or die(); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Accept-Encoding: deflate +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '' } ]; +ok($tf->handle_http($t) == 0, 'Vary is set'); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Accept-Encoding: deflate +Host: no-cache.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Length' => '1288', '+Content-Encoding' => '' } ]; +ok($tf->handle_http($t) == 0, 'deflate - Content-Length and Content-Encoding is set'); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Accept-Encoding: deflate +Host: cache.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Length' => '1288', '+Content-Encoding' => '' } ]; +ok($tf->handle_http($t) == 0, 'deflate - Content-Length and Content-Encoding is set'); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Accept-Encoding: gzip +Host: no-cache.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Length' => '1306', '+Content-Encoding' => '' } ]; +ok($tf->handle_http($t) == 0, 'gzip - Content-Length and Content-Encoding is set'); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Accept-Encoding: gzip +Host: cache.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Length' => '1306', '+Content-Encoding' => '' } ]; +ok($tf->handle_http($t) == 0, 'gzip - Content-Length and Content-Encoding is set'); + + +$t->{REQUEST} = ( <<EOF +GET /index.txt HTTP/1.0 +Accept-Encoding: gzip, deflate +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', '+Content-Encoding' => '' } ]; +ok($tf->handle_http($t) == 0, 'gzip, deflate - Content-Length and Content-Encoding is set'); + +$t->{REQUEST} = ( <<EOF +GET /index.txt HTTP/1.0 +Accept-Encoding: gzip, deflate +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', '+Content-Encoding' => '', 'Content-Type' => "text/plain; charset=utf-8" } ]; +ok($tf->handle_http($t) == 0, 'Content-Type is from the original file'); + +$t->{REQUEST} = ( <<EOF +GET /index.txt HTTP/1.0 +Accept-encoding: +X-Accept-encoding: x-i2p-gzip;q=1.0, identity;q=0.5, deflate;q=0, gzip;q=0, *;q=0 +User-Agent: MYOB/6.66 (AN/ON) +Connection: close +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Type' => "text/plain; charset=utf-8" } ]; +ok($tf->handle_http($t) == 0, 'Empty Accept-Encoding'); + +$t->{REQUEST} = ( <<EOF +GET /index.txt HTTP/1.0 +Accept-Encoding: bzip2, gzip, deflate +Host: cache.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Encoding' => 'gzip', 'Content-Type' => "text/plain; charset=utf-8" } ]; +ok($tf->handle_http($t) == 0, 'bzip2 requested but disabled'); + + +ok($tf->stop_proc == 0, "Stopping lighttpd"); diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-extforward.conf b/data/lighttpd/lighttpd-1.4.53/tests/mod-extforward.conf new file mode 100644 index 000000000..caa666306 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-extforward.conf @@ -0,0 +1,34 @@ +debug.log-request-handling = "enable" +debug.log-response-header = "disable" +debug.log-request-header = "disable" + +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +## 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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" +server.tag = "Apache 1.3.29" + +server.modules = ( + "mod_cgi", + "mod_extforward", +) + +mimetype.assign = ( + ".html" => "text/html", +) + +cgi.assign = ( + ".pl" => env.PERL, +) + +extforward.headers = ( "Forwarded", "X-Forwarded-For", "Forwarded-For" ) +extforward.forwarder = ( + "127.0.0.1" => "trust", + "127.0.30.1" => "trust", +) diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-extforward.t b/data/lighttpd/lighttpd-1.4.53/tests/mod-extforward.t new file mode 100755 index 000000000..737c9147e --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-extforward.t @@ -0,0 +1,57 @@ +#!/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 => 6; +use LightyTest; + +my $tf = LightyTest->new(); +my $t; + +$tf->{CONFIGFILE} = 'mod-extforward.conf'; + +ok($tf->start_proc == 0, "Starting lighttpd") or die(); + +$t->{REQUEST} = ( <<EOF +GET /ip.pl HTTP/1.0 +Host: www.example.org +X-Forwarded-For: 127.0.10.1 +EOF +); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '127.0.10.1' } ]; +ok($tf->handle_http($t) == 0, 'expect 127.0.10.1, from single ip'); + +$t->{REQUEST} = ( <<EOF +GET /ip.pl HTTP/1.0 +Host: www.example.org +X-Forwarded-For: 127.0.10.1, 127.0.20.1 +EOF +); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '127.0.20.1' } ]; +ok($tf->handle_http($t) == 0, 'expect 127.0.20.1, from two ips'); + +$t->{REQUEST} = ( <<EOF +GET /ip.pl HTTP/1.0 +Host: www.example.org +X-Forwarded-For: 127.0.10.1, 127.0.20.1, 127.0.30.1 +EOF +); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '127.0.20.1' } ]; +ok($tf->handle_http($t) == 0, 'expect 127.0.20.1, from chained proxies'); + +$t->{REQUEST} = ( <<EOF +GET /ip.pl HTTP/1.0 +Host: www.example.org +Forwarded: for=127.0.10.1, for=127.0.20.1;proto=https, for=127.0.30.1;proto=http +EOF +); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '127.0.20.1' } ]; +ok($tf->handle_http($t) == 0, 'expect 127.0.20.1, from chained proxies'); + +ok($tf->stop_proc == 0, "Stopping lighttpd"); diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-fastcgi.t b/data/lighttpd/lighttpd-1.4.53/tests/mod-fastcgi.t new file mode 100755 index 000000000..7a00963cd --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-fastcgi.t @@ -0,0 +1,382 @@ +#!/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 Test::More tests => 46; +use LightyTest; + +my $tf = LightyTest->new(); + +my $t; + +SKIP: { + skip "no php binary found", 31 unless $LightyTest::HAVE_PHP; + + $tf->{CONFIGFILE} = 'fastcgi-10.conf'; + ok($tf->start_proc == 0, "Starting lighttpd") or goto cleanup; + + $t->{REQUEST} = ( <<EOF +GET /phpinfo.php HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'valid request'); + + $t->{REQUEST} = ( <<EOF +GET /phpinfofoobar.php HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; + ok($tf->handle_http($t) == 0, 'file not found'); + + $t->{REQUEST} = ( <<EOF +GET /go/ HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'index-file handling'); + + $t->{REQUEST} = ( <<EOF +GET /redirect.php HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 302, 'Location' => 'http://www.example.org:2048/' } ]; + ok($tf->handle_http($t) == 0, 'Status + Location via FastCGI'); + + $t->{REQUEST} = ( <<EOF +GET /redirect.php/ HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 302, 'Location' => 'http://www.example.org:2048/' } ]; + ok($tf->handle_http($t) == 0, 'Trailing slash as path-info (#1989: workaround broken operating systems)'); + + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php?env=PHP_SELF HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, '$_SERVER["PHP_SELF"]'); + + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php/foo?env=SCRIPT_NAME HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/get-server-env.php' } ]; + ok($tf->handle_http($t) == 0, '$_SERVER["SCRIPT_NAME"]'); + + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php/foo?env=PATH_INFO HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/foo' } ]; + ok($tf->handle_http($t) == 0, '$_SERVER["PATH_INFO"]'); + + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php?env=SERVER_NAME HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'www.example.org' } ]; + ok($tf->handle_http($t) == 0, 'SERVER_NAME'); + + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php?env=SERVER_NAME HTTP/1.0 +Host: foo.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'www.example.org' } ]; + ok($tf->handle_http($t) == 0, 'SERVER_NAME'); + + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php?env=SERVER_NAME HTTP/1.0 +Host: vvv.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'www.example.org' } ]; + ok($tf->handle_http($t) == 0, 'SERVER_NAME'); + + $t->{REQUEST} = ( <<EOF +GET /cgi.php/abc HTTP/1.0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'PATHINFO'); + + if ($^O ne "cygwin") { + $t->{REQUEST} = ( <<EOF +GET /cgi.php%20%20%20 HTTP/1.0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; + ok($tf->handle_http($t) == 0, 'No source retrieval'); + } else { + ok(1, 'No source retrieval; skipped on cygwin; see response.c'); + } + + $t->{REQUEST} = ( <<EOF +GET /www/abc/def HTTP/1.0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; + ok($tf->handle_http($t) == 0, 'PATHINFO on a directory'); + + $t->{REQUEST} = ( <<EOF +GET /indexfile/ HTTP/1.0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/indexfile/index.php' } ]; + ok($tf->handle_http($t) == 0, 'PHP_SELF + Indexfile, Bug #3'); + + $t->{REQUEST} = ( <<EOF +GET /prefix.fcgi?var=SCRIPT_NAME HTTP/1.0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/prefix.fcgi' } ]; + ok($tf->handle_http($t) == 0, 'PATH_INFO, check-local off'); + + $t->{REQUEST} = ( <<EOF +GET /prefix.fcgi/foo/bar?var=SCRIPT_NAME HTTP/1.0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/prefix.fcgi' } ]; + ok($tf->handle_http($t) == 0, 'PATH_INFO, check-local off'); + + $t->{REQUEST} = ( <<EOF +GET /prefix.fcgi/foo/bar?var=PATH_INFO HTTP/1.0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/foo/bar' } ]; + ok($tf->handle_http($t) == 0, 'PATH_INFO, check-local off'); + + $t->{REQUEST} = ( <<EOF +GET /sendfile.php?range=0- HTTP/1.0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Length' => 4348 } ]; + ok($tf->handle_http($t) == 0, 'X-Sendfile2'); + + $t->{REQUEST} = ( <<EOF +GET /sendfile.php?range=0-4&range2=5- HTTP/1.0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Length' => 4348 } ]; + ok($tf->handle_http($t) == 0, 'X-Sendfile2'); + + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php?env=REMOTE_USER HTTP/1.0 +Host: auth.example.org +Authorization: Basic ZGVzOmRlcw== +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'des' } ]; + ok($tf->handle_http($t) == 0, '$_SERVER["REMOTE_USER"]'); + + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php?env=AUTH_TYPE HTTP/1.0 +Host: auth.example.org +Authorization: Basic ZGVzOmRlcw== +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'Basic' } ]; + ok($tf->handle_http($t) == 0, '$_SERVER["AUTH_TYPE"]'); + + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php?env=SERVER_NAME HTTP/1.0 +Host: zzz.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'zzz.example.org' } ]; + ok($tf->handle_http($t) == 0, 'FastCGI + Host'); + + $t->{REQUEST} = ( <<EOF +GET http://zzz.example.org/get-server-env.php?env=SERVER_NAME HTTP/1.0 +Host: aaa.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'zzz.example.org' } ]; + ok($tf->handle_http($t) == 0, 'SERVER_NAME (absolute url in request line)'); + + $t->{REQUEST} = ( <<EOF +GET /indexfile/ HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/indexfile/index.php' } ]; + ok($tf->handle_http($t) == 0, 'Bug #6'); + + $t->{REQUEST} = ( <<EOF +POST /indexfile/abc HTTP/1.0 +Host: www.example.org +Content-Length: 0 +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404, 'HTTP-Content' => '/indexfile/return-404.php' } ]; + ok($tf->handle_http($t) == 0, 'Bug #12'); + + $t->{REQUEST} = ( <<EOF +GET /indexfile/index.php HTTP/1.0 +Host: bin-env.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'FastCGI + local spawning'); + + $t->{REQUEST} = ( <<EOF +HEAD /indexfile/index.php HTTP/1.0 +Host: bin-env.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '-Content-Length' => '0' } ]; + # Of course a valid content-length != 0 would be ok, but we assume for now that such one is not generated. + ok($tf->handle_http($t) == 0, 'Check for buggy content length with HEAD'); + + $t->{REQUEST} = ( <<EOF +GET /get-env.php?env=MAIL HTTP/1.0 +Host: bin-env.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 , 'HTTP-Content' => '' } ]; + ok($tf->handle_http($t) == 0, 'FastCGI + bin-copy-environment'); + + ok($tf->stop_proc == 0, "Stopping lighttpd"); +} + +SKIP: { + skip "no fcgi-auth, fcgi-responder found", 15 + unless (-x $tf->{BASEDIR}."/tests/fcgi-auth" || -x $tf->{BASEDIR}."/tests/fcgi-auth.exe") + && (-x $tf->{BASEDIR}."/tests/fcgi-responder" || -x $tf->{BASEDIR}."/tests/fcgi-responder.exe"); + + $tf->{CONFIGFILE} = 'fastcgi-responder.conf'; + ok($tf->start_proc == 0, "Starting lighttpd with $tf->{CONFIGFILE}") or die(); + $t->{REQUEST} = ( <<EOF +GET /index.html?ok HTTP/1.0 +Host: auth.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'FastCGI - Auth'); + + $t->{REQUEST} = ( <<EOF +GET /index.html?fail HTTP/1.0 +Host: auth.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; + ok($tf->handle_http($t) == 0, 'FastCGI - Auth'); + + $t->{REQUEST} = ( <<EOF +GET /expire/access.txt?ok HTTP/1.0 +Host: auth.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'FastCGI - Auth in subdirectory'); + + $t->{REQUEST} = ( <<EOF +GET /index.fcgi?varfail HTTP/1.0 +Host: auth.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; + ok($tf->handle_http($t) == 0, 'FastCGI - Auth Fail with FastCGI responder afterwards'); + + $t->{REQUEST} = ( <<EOF +GET /index.fcgi?var HTTP/1.0 +Host: auth.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'LighttpdTestContent' } ]; + ok($tf->handle_http($t) == 0, 'FastCGI - Auth Success with Variable- to Env expansion'); + + $t->{REQUEST} = ( <<EOF +GET /index.fcgi?lf HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ]; + ok($tf->handle_http($t) == 0, 'line-ending \n\n'); + + $t->{REQUEST} = ( <<EOF +GET /index.fcgi?crlf HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ]; + ok($tf->handle_http($t) == 0, 'line-ending \r\n\r\n'); + + $t->{REQUEST} = ( <<EOF +GET /index.fcgi?slow-lf HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ]; + ok($tf->handle_http($t) == 0, 'line-ending \n + \n'); + + $t->{REQUEST} = ( <<EOF +GET /index.fcgi?slow-crlf HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ]; + ok($tf->handle_http($t) == 0, 'line-ending \r\n + \r\n'); + + $t->{REQUEST} = ( <<EOF +GET /abc/def/ghi?path_info HTTP/1.0 +Host: wsgi.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/abc/def/ghi' } ]; + ok($tf->handle_http($t) == 0, 'PATH_INFO (wsgi)'); + + $t->{REQUEST} = ( <<EOF +GET /abc/def/ghi?script_name HTTP/1.0 +Host: wsgi.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '' } ]; + ok($tf->handle_http($t) == 0, 'SCRIPT_NAME (wsgi)'); + + + $t->{REQUEST} = ( <<EOF +GET /index.fcgi?die-at-end HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ]; + ok($tf->handle_http($t) == 0, 'killing fastcgi and wait for restart'); + + # (might take lighttpd 1 sec to detect backend exit) + select(undef, undef, undef, .5); + for (my $c = 2*20; $c && 0 == $tf->listening_on(10000); --$c) { + select(undef, undef, undef, 0.05); + } + $t->{REQUEST} = ( <<EOF +GET /index.fcgi?crlf HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'test123' } ]; + ok($tf->handle_http($t) == 0, 'regular response of after restart'); + + + ok($tf->stop_proc == 0, "Stopping lighttpd"); +} + +exit 0; + +cleanup: ; + +die(); diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-proxy.t b/data/lighttpd/lighttpd-1.4.53/tests/mod-proxy.t new file mode 100755 index 000000000..d3c182142 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-proxy.t @@ -0,0 +1,68 @@ +#!/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_real = LightyTest->new(); +my $tf_proxy = LightyTest->new(); + +my $t; + +## we need two procs +## 1. the real webserver +## 2. the proxy server + +$tf_real->{PORT} = 2048; +$tf_real->{CONFIGFILE} = 'lighttpd.conf'; + +$tf_proxy->{PORT} = 2050; +$tf_proxy->{CONFIGFILE} = 'proxy.conf'; + +ok($tf_real->start_proc == 0, "Starting lighttpd") or goto cleanup; + +ok($tf_proxy->start_proc == 0, "Starting lighttpd as proxy") or goto cleanup; + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf_proxy->handle_http($t) == 0, 'valid request'); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Server' => 'Apache 1.3.29' } ]; +ok($tf_proxy->handle_http($t) == 0, 'drop Server from real server'); + + $t->{REQUEST} = ( <<EOF +GET /rewrite/all/some+test%3axxx%20with%20space HTTP/1.0 +Host: www.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/some+test%3axxx%20with%20space' } ]; + ok($tf_proxy->handle_http($t) == 0, 'rewrited urls work with encoded path'); + +ok($tf_proxy->stop_proc == 0, "Stopping lighttpd proxy"); + +ok($tf_real->stop_proc == 0, "Stopping lighttpd"); + +exit 0; + +cleanup: + +$tf_real->stop_proc; +$tf_proxy->stop_proc; + +die(); diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-secdownload.conf b/data/lighttpd/lighttpd-1.4.53/tests/mod-secdownload.conf new file mode 100644 index 000000000..c857340fa --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-secdownload.conf @@ -0,0 +1,50 @@ +debug.log-request-handling = "enable" +debug.log-request-header = "enable" +debug.log-response-header = "enable" + +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +## 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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" +server.tag = "Apache 1.3.29" + +server.modules = ( + "mod_secdownload", + "mod_accesslog", +) + +accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log" + +$HTTP["host"] == "vvv.example.org" { + server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + secdownload.secret = "verysecret" + secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + secdownload.uri-prefix = "/sec/" + secdownload.timeout = 120 + secdownload.algorithm = "md5" +} + +$HTTP["host"] == "vvv-sha1.example.org" { + server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + secdownload.secret = "verysecret" + secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + secdownload.uri-prefix = "/sec/" + secdownload.timeout = 120 + secdownload.algorithm = "hmac-sha1" +} + +$HTTP["host"] == "vvv-sha256.example.org" { + server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + secdownload.secret = "verysecret" + secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + secdownload.uri-prefix = "/sec/" + secdownload.timeout = 120 + secdownload.algorithm = "hmac-sha256" + secdownload.hash-querystr = "enable" +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-secdownload.t b/data/lighttpd/lighttpd-1.4.53/tests/mod-secdownload.t new file mode 100755 index 000000000..91276cdda --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-secdownload.t @@ -0,0 +1,198 @@ +#!/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 => 16; +use LightyTest; +use Digest::MD5 qw(md5_hex); +use Digest::SHA qw(hmac_sha1 hmac_sha256); +use MIME::Base64 qw(encode_base64url); + +my $tf = LightyTest->new(); +my $t; + +$tf->{CONFIGFILE} = 'mod-secdownload.conf'; +ok($tf->start_proc == 0, "Starting lighttpd") or die(); + +my $secret = "verysecret"; +my ($f, $thex, $m); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + +ok($tf->handle_http($t) == 0, 'skipping secdownload - direct access'); + +## MD5 +$f = "/index.html"; +$thex = sprintf("%08x", time); +$m = md5_hex($secret.$f.$thex); + +$t->{REQUEST} = ( <<EOF +GET /sec/$m/$thex$f HTTP/1.0 +Host: vvv.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload (md5)'); + +$thex = sprintf("%08x", time - 1800); +$m = md5_hex($secret.$f.$thex); + +$t->{REQUEST} = ( <<EOF +GET /sec/$m/$thex$f HTTP/1.0 +Host: vvv.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 410 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload - gone (timeout) (md5)'); + +$t->{REQUEST} = ( <<EOF +GET /sec$f HTTP/1.0 +Host: vvv.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload - direct access (md5)'); + +$f = "/noexists"; +$thex = sprintf("%08x", time); +$m = md5_hex($secret.$f.$thex); + +$t->{REQUEST} = ( <<EOF +GET /sec/$m/$thex$f HTTP/1.0 +Host: vvv.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload - timeout (md5)'); + +## HMAC-SHA1 +$f = "/index.html"; +$thex = sprintf("%08x", time); +$m = encode_base64url(hmac_sha1("/$thex$f", $secret)); + +$t->{REQUEST} = ( <<EOF +GET /sec/$m/$thex$f HTTP/1.0 +Host: vvv-sha1.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload (hmac-sha1)'); + +$thex = sprintf("%08x", time - 1800); +$m = encode_base64url(hmac_sha1("/$thex$f", $secret)); + +$t->{REQUEST} = ( <<EOF +GET /sec/$m/$thex$f HTTP/1.0 +Host: vvv-sha1.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 410 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload - gone (timeout) (hmac-sha1)'); + +$t->{REQUEST} = ( <<EOF +GET /sec$f HTTP/1.0 +Host: vvv-sha1.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload - direct access (hmac-sha1)'); + + +$f = "/noexists"; +$thex = sprintf("%08x", time); +$m = encode_base64url(hmac_sha1("/$thex$f", $secret)); + +$t->{REQUEST} = ( <<EOF +GET /sec/$m/$thex$f HTTP/1.0 +Host: vvv-sha1.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload - timeout (hmac-sha1)'); + +## HMAC-SHA256 +$f = "/index.html"; +$thex = sprintf("%08x", time); +$m = encode_base64url(hmac_sha256("/$thex$f", $secret)); + +$t->{REQUEST} = ( <<EOF +GET /sec/$m/$thex$f HTTP/1.0 +Host: vvv-sha256.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload (hmac-sha256)'); + +## HMAC-SHA256 +$f = "/index.html?qs=1"; +$thex = sprintf("%08x", time); +$m = encode_base64url(hmac_sha256("/$thex$f", $secret)); + +$t->{REQUEST} = ( <<EOF +GET /sec/$m/$thex$f HTTP/1.0 +Host: vvv-sha256.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload (hmac-sha256) with hash-querystr'); + +$thex = sprintf("%08x", time - 1800); +$m = encode_base64url(hmac_sha256("/$thex$f", $secret)); + +$t->{REQUEST} = ( <<EOF +GET /sec/$m/$thex$f HTTP/1.0 +Host: vvv-sha256.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 410 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload - gone (timeout) (hmac-sha256)'); + +$t->{REQUEST} = ( <<EOF +GET /sec$f HTTP/1.0 +Host: vvv-sha256.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload - direct access (hmac-sha256)'); + + +$f = "/noexists"; +$thex = sprintf("%08x", time); +$m = encode_base64url(hmac_sha256("/$thex$f", $secret)); + +$t->{REQUEST} = ( <<EOF +GET /sec/$m/$thex$f HTTP/1.0 +Host: vvv-sha256.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; + +ok($tf->handle_http($t) == 0, 'secdownload - timeout (hmac-sha256)'); + +## THE END + +ok($tf->stop_proc == 0, "Stopping lighttpd"); + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-setenv.t b/data/lighttpd/lighttpd-1.4.53/tests/mod-setenv.t new file mode 100755 index 000000000..0c3ce764f --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-setenv.t @@ -0,0 +1,76 @@ +#!/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 => 9; +use LightyTest; + +my $tf = LightyTest->new(); +my $t; + +ok($tf->start_proc == 0, "Starting lighttpd") or die(); + +$t->{REQUEST} = ( <<EOF +GET /get-header.pl?TRAC_ENV HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'tracenv' } ]; +ok($tf->handle_http($t) == 0, 'query first setenv'); + +$t->{REQUEST} = ( <<EOF +GET /get-header.pl?SETENV HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'setenv' } ]; +ok($tf->handle_http($t) == 0, 'query second setenv'); + +$t->{REQUEST} = ( <<EOF +GET /get-header.pl?NEWENV HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'newenv' } ]; +ok($tf->handle_http($t) == 0, 'query set-environment'); + +$t->{REQUEST} = ( <<EOF +GET /get-header.pl?HTTP_FOO HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'foo' } ]; +ok($tf->handle_http($t) == 0, 'query add-request-header'); + +$t->{REQUEST} = ( <<EOF +GET /get-header.pl?HTTP_FOO2 HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'foo2' } ]; +ok($tf->handle_http($t) == 0, 'query set-request-header'); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'BAR' => 'foo' } ]; +ok($tf->handle_http($t) == 0, 'query add-response-header'); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'BAR2' => 'bar2' } ]; +ok($tf->handle_http($t) == 0, 'query set-response-header'); + +ok($tf->stop_proc == 0, "Stopping lighttpd"); + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-ssi.t b/data/lighttpd/lighttpd-1.4.53/tests/mod-ssi.t new file mode 100755 index 000000000..f2f3bf4c3 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-ssi.t @@ -0,0 +1,45 @@ +#!/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 => 5; +use LightyTest; + +my $tf = LightyTest->new(); +my $t; + +ok($tf->start_proc == 0, "Starting lighttpd") or die(); + +$t->{REQUEST} = ( <<EOF +GET /ssi.shtml HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "/ssi.shtml\n" } ]; +ok($tf->handle_http($t) == 0, 'ssi - echo '); + + +## bug #280 +$t->{REQUEST} = ( <<EOF +GET /exec-date.shtml HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "2\n\n" } ]; +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.shtml\n/ssi-include.shtml\n/ssi-include.shtml\nssi-include\n\nssi-include\n\n" } ]; +ok($tf->handle_http($t) == 0, 'ssi - include'); + + +ok($tf->stop_proc == 0, "Stopping lighttpd"); + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/mod-userdir.t b/data/lighttpd/lighttpd-1.4.53/tests/mod-userdir.t new file mode 100755 index 000000000..52f9c32f1 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/mod-userdir.t @@ -0,0 +1,58 @@ +#!/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(); + +# get current user + +$t->{REQUEST} = ( <<EOF +GET /~foobar/ HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; +ok($tf->handle_http($t) == 0, 'valid user'); + +$t->{REQUEST} = ( <<EOF +GET /%7Efoobar/ HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; +ok($tf->handle_http($t) == 0, 'valid user with url-encoded ~ as %7E'); + +$t->{REQUEST} = ( <<EOF +GET /~jan HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://'.$tf->{HOSTNAME}.':'.$tf->{PORT}.'/~jan/' } ]; +ok($tf->handle_http($t) == 0, 'valid user + redirect'); + +$t->{REQUEST} = ( <<EOF +GET /%7Ejan HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://'.$tf->{HOSTNAME}.':'.$tf->{PORT}.'/~jan/' } ]; +ok($tf->handle_http($t) == 0, 'valid user with url encoded ~ as %7E + redirect'); + +$t->{REQUEST} = ( <<EOF +GET /~jan HTTP/1.0 +Host: www.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 301, 'Location' => 'http://www.example.org/~jan/' } ]; +ok($tf->handle_http($t) == 0, 'valid user + redirect'); + +ok($tf->stop_proc == 0, "Stopping lighttpd"); + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/prepare.sh b/data/lighttpd/lighttpd-1.4.53/tests/prepare.sh new file mode 100755 index 000000000..f2fc3b839 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/prepare.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +set -e + +if test "x${srcdir}" = "x"; then + srcdir=. +fi + +if test "x${top_builddir}" = "x"; then + top_builddir=.. +fi + +tmpdir="${top_builddir}/tests/tmp/lighttpd" + +# create test-framework +rm -rf "${tmpdir}" +mkdir -p "${tmpdir}/servers/www.example.org/pages/" +mkdir -p "${tmpdir}/servers/www.example.org/pages/dummydir/" +mkdir -p "${tmpdir}/servers/www.example.org/pages/~test ä_/" +mkdir -p "${tmpdir}/servers/www.example.org/pages/go/" +mkdir -p "${tmpdir}/servers/www.example.org/pages/expire/" +mkdir -p "${tmpdir}/servers/www.example.org/pages/indexfile/" +mkdir -p "${tmpdir}/servers/123.example.org/pages/" +mkdir -p "${tmpdir}/servers/a.example.org/pages/a/" +mkdir -p "${tmpdir}/servers/b.example.org/pages/b/" +mkdir -p "${tmpdir}/logs/" +mkdir -p "${tmpdir}/cache/" +mkdir -p "${tmpdir}/cache/compress/" + +# copy everything into the right places +cp "${srcdir}/docroot/www/"*.html \ + "${srcdir}/docroot/www/"*.php \ + "${srcdir}/docroot/www/"*.pl \ + "${srcdir}/docroot/www/"*.fcgi \ + "${srcdir}/docroot/www/"*.shtml \ + "${srcdir}/docroot/www/"*.txt \ + "${tmpdir}/servers/www.example.org/pages/" +cp "${srcdir}/docroot/www/go/"*.php "${tmpdir}/servers/www.example.org/pages/go/" +cp "${srcdir}/docroot/www/expire/"*.txt "${tmpdir}/servers/www.example.org/pages/expire/" +cp "${srcdir}/docroot/www/indexfile/"*.php "${tmpdir}/servers/www.example.org/pages/indexfile/" +cp "${srcdir}/docroot/www/indexfile/"*.pl "${tmpdir}/servers/www.example.org/pages/indexfile/" +cp "${srcdir}/docroot/123/"*.txt \ + "${srcdir}/docroot/123/"*.html \ + "${srcdir}/docroot/123/"*.php \ + "${srcdir}/docroot/123/"*.bla \ + "${tmpdir}/servers/123.example.org/pages/" +cp "${srcdir}/lighttpd.user" "${tmpdir}/" +cp "${srcdir}/lighttpd.htpasswd" "${tmpdir}/" +cp "${srcdir}/var-include-sub.conf" "${tmpdir}/../" +touch "${tmpdir}/servers/www.example.org/pages/image.jpg" \ + "${tmpdir}/servers/www.example.org/pages/image.JPG" \ + "${tmpdir}/servers/www.example.org/pages/Foo.txt" \ + "${tmpdir}/servers/www.example.org/pages/a" \ + "${tmpdir}/servers/www.example.org/pages/index.html~" +echo "12345" > "${tmpdir}/servers/www.example.org/pages/range.pdf" + +printf "%-40s" "preparing infrastructure" + +exit 0 diff --git a/data/lighttpd/lighttpd-1.4.53/tests/proxy.conf b/data/lighttpd/lighttpd-1.4.53/tests/proxy.conf new file mode 100644 index 000000000..38ab6e945 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/proxy.conf @@ -0,0 +1,31 @@ +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +## bind to port (default: 80) +server.port = 2050 + +## bind to localhost (default: all interfaces) +server.bind = "localhost" +server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log" +server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" +server.tag = "Proxy" + +server.modules = ( + "mod_rewrite", + "mod_proxy", + "mod_accesslog", +) + +accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log" + +proxy.debug = 1 +proxy.server = ( "" => ( + "grisu" => ( + "host" => "127.0.0.1", + "port" => 2048, + ), +)) + +url.rewrite = ( + "^/rewrite/all(/.*)$" => "/indexfile/query_string.pl?$1", +) diff --git a/data/lighttpd/lighttpd-1.4.53/tests/request.t b/data/lighttpd/lighttpd-1.4.53/tests/request.t new file mode 100755 index 000000000..96ef077b2 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/request.t @@ -0,0 +1,562 @@ +#!/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 => 52; +use LightyTest; + +my $tf = LightyTest->new(); +my $t; + +ok($tf->start_proc == 0, "Starting lighttpd") or die(); + +## Basic Request-Handling + +$t->{REQUEST} = ( <<EOF +GET /foobar HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; +ok($tf->handle_http($t) == 0, 'file not found'); + +$t->{REQUEST} = ( <<EOF +GET /foobar?foobar HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; +ok($tf->handle_http($t) == 0, 'file not found + querystring'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain' } ]; +ok($tf->handle_http($t) == 0, 'GET, content == 12345, mimetype text/plain'); + +$t->{REQUEST} = ( <<EOF +GET /12345.html HTTP/1.0 +Host: 123.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/html' } ]; +ok($tf->handle_http($t) == 0, 'GET, content == 12345, mimetype text/html'); + +$t->{REQUEST} = ( <<EOF +GET /dummyfile.bla HTTP/1.0 +Host: 123.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'application/octet-stream' } ]; +ok($tf->handle_http($t) == 0, 'GET, content == 12345, mimetype application/octet-stream'); + + +$t->{REQUEST} = ( <<EOF +POST / HTTP/1.0 +Content-type: application/x-www-form-urlencoded +Content-length: 0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'POST request, empty request-body'); + +$t->{REQUEST} = ( <<EOF +HEAD / HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '-HTTP-Content' => ''} ]; +ok($tf->handle_http($t) == 0, 'HEAD request, no content'); + +$t->{REQUEST} = ( <<EOF +HEAD /12345.html HTTP/1.0 +Host: 123.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '-HTTP-Content' => '', 'Content-Type' => 'text/html', 'Content-Length' => '6'} ]; +ok($tf->handle_http($t) == 0, 'HEAD request, mimetype text/html, content-length'); + +$t->{REQUEST} = ( <<EOF +HEAD http://123.example.org/12345.html HTTP/1.1 +Connection: close +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, '-HTTP-Content' => '', 'Content-Type' => 'text/html', 'Content-Length' => '6'} ]; +ok($tf->handle_http($t) == 0, 'Hostname in first line, HTTP/1.1'); + +$t->{REQUEST} = ( <<EOF +HEAD https://123.example.org/12345.html HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '-HTTP-Content' => '', 'Content-Type' => 'text/html', 'Content-Length' => '6'} ]; +ok($tf->handle_http($t) == 0, 'Hostname in first line as https url'); + +$t->{REQUEST} = ( <<EOF +HEAD /foobar?foobar HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404, '-HTTP-Content' => '' } ]; +ok($tf->handle_http($t) == 0, 'HEAD request, file-not-found, query-string'); + +# (expect 200 OK instead of 100 Continue since request body sent with request) +# (if we waited to send request body, would expect 100 Continue, first) +$t->{REQUEST} = ( <<EOF +POST /get-post-len.pl HTTP/1.1 +Host: www.example.org +Connection: close +Content-Type: application/x-www-form-urlencoded +Content-Length: 4 +Expect: 100-continue + +123 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'Continue, Expect'); + +# note Transfer-Encoding: chunked tests will fail with 411 Length Required if +# server.stream-request-body != 0 in lighttpd.conf +$t->{REQUEST} = ( <<EOF +POST /get-post-len.pl HTTP/1.1 +Host: www.example.org +Connection: close +Content-Type: application/x-www-form-urlencoded +Transfer-Encoding: chunked + +a +0123456789 +0 + +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked, lc hex'); + +$t->{REQUEST} = ( <<EOF +POST /get-post-len.pl HTTP/1.1 +Host: www.example.org +Connection: close +Content-Type: application/x-www-form-urlencoded +Transfer-Encoding: chunked + +A +0123456789 +0 + +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked, uc hex'); + +$t->{REQUEST} = ( <<EOF +POST /get-post-len.pl HTTP/1.1 +Host: www.example.org +Connection: close +Content-Type: application/x-www-form-urlencoded +Transfer-Encoding: chunked + +10 +0123456789abcdef +0 + +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked, two hex'); + +$t->{REQUEST} = ( <<EOF +POST /get-post-len.pl HTTP/1.1 +Host: www.example.org +Connection: close +Content-Type: application/x-www-form-urlencoded +Transfer-Encoding: chunked + +a +0123456789 +0 +Test-Trailer: testing + +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked, with trailer'); + +$t->{REQUEST} = ( <<EOF +POST /get-post-len.pl HTTP/1.1 +Host: www.example.org +Connection: close +Content-Type: application/x-www-form-urlencoded +Transfer-Encoding: chunked + +a; comment +0123456789 +0 + +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked, chunked header comment'); + +$t->{REQUEST} = ( <<EOF +POST /get-post-len.pl HTTP/1.1 +Host: www.example.org +Connection: close +Content-Type: application/x-www-form-urlencoded +Transfer-Encoding: chunked + +az +0123456789 +0 + +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 400 } ]; +ok($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked; bad chunked header'); + +$t->{REQUEST} = ( <<EOF +POST /get-post-len.pl HTTP/1.1 +Host: www.example.org +Connection: close +Content-Type: application/x-www-form-urlencoded +Transfer-Encoding: chunked + +a +0123456789xxxxxxxx +0 + +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 400 } ]; +ok($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked; mismatch chunked header size and chunked data size'); + +$t->{REQUEST} = ( <<EOF +POST /get-post-len.pl HTTP/1.1 +Host: www.example.org +Connection: close +Content-Type: application/x-www-form-urlencoded +Transfer-Encoding: chunked + +a ; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +0123456789 +0 + +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 400 } ]; +ok($tf->handle_http($t) == 0, 'POST via Transfer-Encoding: chunked; chunked header too long'); + +## ranges + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +Range: bytes=0-3 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 206, 'HTTP-Content' => '1234' } ]; +ok($tf->handle_http($t) == 0, 'GET, Range 0-3'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +Range: bytes=-3 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 206, 'HTTP-Content' => '45'."\n" } ]; +ok($tf->handle_http($t) == 0, 'GET, Range -3'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +Range: bytes=3- +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 206, 'HTTP-Content' => '45'."\n" } ]; +ok($tf->handle_http($t) == 0, 'GET, Range 3-'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +Range: bytes=0-1,3-4 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 206, 'HTTP-Content' => <<EOF +\r +--fkj49sn38dcn3\r +Content-Range: bytes 0-1/6\r +Content-Type: text/plain\r +\r +12\r +--fkj49sn38dcn3\r +Content-Range: bytes 3-4/6\r +Content-Type: text/plain\r +\r +45\r +--fkj49sn38dcn3--\r +EOF + } ]; +ok($tf->handle_http($t) == 0, 'GET, Range 0-1,3-4'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +Range: bytes=0-- +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'GET, Range 0--'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +Range: bytes=-2-3 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'GET, Range -2-3'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +Range: bytes=-0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 416, 'HTTP-Content' => <<EOF +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <title>416 Requested Range Not Satisfiable</title> + </head> + <body> + <h1>416 Requested Range Not Satisfiable</h1> + </body> +</html> +EOF + } ]; +ok($tf->handle_http($t) == 0, 'GET, Range -0'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +Range: bytes=25- +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 416, 'HTTP-Content' => <<EOF +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <title>416 Requested Range Not Satisfiable</title> + </head> + <body> + <h1>416 Requested Range Not Satisfiable</h1> + </body> +</html> +EOF + } ]; + +ok($tf->handle_http($t) == 0, 'GET, Range start out of range'); + + +$t->{REQUEST} = ( <<EOF +GET / HTTP/1.0 +Hsgfsdjf: asdfhdf +hdhd: shdfhfdasd +hfhr: jfghsdfg +jfuuehdmn: sfdgjfdg +jvcbzufdg: sgfdfg +hrnvcnd: jfjdfg +jfusfdngmd: gfjgfdusdfg +nfj: jgfdjdfg +jfue: jfdfdg +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'larger headers'); + + +$t->{REQUEST} = ( <<EOF +GET /range.pdf HTTP/1.0 +Range: bytes=0- +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'GET, Range with range-requests-disabled'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +Range: 0 +Range: bytes=0-3 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => "12345\n" } ]; +ok($tf->handle_http($t) == 0, 'GET, Range invalid range-unit (first)'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +Range: bytes=0-3 +Range: 0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 206 } ]; +ok($tf->handle_http($t) == 0, 'GET, Range ignore invalid range (second)'); + +$t->{REQUEST} = ( <<EOF +OPTIONS / HTTP/1.0 +Content-Length: 4 + +1234 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'OPTIONS with Content-Length'); + +$t->{REQUEST} = ( <<EOF +OPTIONS rtsp://221.192.134.146:80 RTSP/1.1 +Host: 221.192.134.146:80 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 400 } ]; +ok($tf->handle_http($t) == 0, 'OPTIONS for RTSP'); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +If-Modified-Since: Sun, 01 Jan 2036 00:00:02 GMT +If-Modified-Since: Sun, 01 Jan 2036 00:00:02 GMT +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; +ok($tf->handle_http($t) == 0, 'Duplicate If-Mod-Since, with equal timestamps'); + +$t->{REQUEST} = ( "GET / HTTP/1.0\r\nIf-Modified-Since: \r\n\r\n" ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'empty If-Modified-Since'); + +$t->{REQUEST} = ( "GET / HTTP/1.0\r\nIf-Modified-Since: foobar\r\n\r\n" ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'broken If-Modified-Since'); + +$t->{REQUEST} = ( "GET / HTTP/1.0\r\nIf-Modified-Since: this string is too long to be a valid timestamp\r\n\r\n" ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; +ok($tf->handle_http($t) == 0, 'broken If-Modified-Since'); + + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +If-Modified-Since2: Sun, 01 Jan 2036 00:00:03 GMT +If-Modified-Since: Sun, 01 Jan 2036 00:00:02 GMT +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304 } ]; +ok($tf->handle_http($t) == 0, 'Similar Headers (bug #1287)'); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +If-Modified-Since: Sun, 01 Jan 2036 00:00:02 GMT +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304, 'Content-Type' => 'text/html' } ]; +ok($tf->handle_http($t) == 0, 'If-Modified-Since'); + +$t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +If-Modified-Since: Sun, 01 Jan 2036 00:00:02 GMT +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 304, '-Content-Length' => '' } ]; +ok($tf->handle_http($t) == 0, 'Status 304 has no Content-Length (#1002)'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.0 +Host: 123.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain' } ]; +$t->{SLOWREQUEST} = 1; +ok($tf->handle_http($t) == 0, 'GET, slow \\r\\n\\r\\n (#2105)'); +undef $t->{SLOWREQUEST}; + +print "\nPathinfo for static files\n"; +$t->{REQUEST} = ( <<EOF +GET /image.jpg/index.php HTTP/1.0 +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Type' => 'image/jpeg' } ]; +ok($tf->handle_http($t) == 0, 'static file accepting pathinfo by default'); + +$t->{REQUEST} = ( <<EOF +GET /image.jpg/index.php HTTP/1.0 +Host: zzz.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; +ok($tf->handle_http($t) == 0, 'static file with forbidden pathinfo'); + + +print "\nConnection header\n"; +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.1 +Connection : close +Host: 123.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ]; +ok($tf->handle_http($t) == 0, 'Connection-header, spaces before ":"'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.1 +Connection: ,close +Host: 123.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ]; +ok($tf->handle_http($t) == 0, 'Connection-header, leading comma'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.1 +Connection: close,,TE +Host: 123.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ]; +ok($tf->handle_http($t) == 0, 'Connection-header, no value between two commas'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.1 +Connection: close, ,TE +Host: 123.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ]; +ok($tf->handle_http($t) == 0, 'Connection-header, space between two commas'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.1 +Connection: close, +Host: 123.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ]; +ok($tf->handle_http($t) == 0, 'Connection-header, comma after value'); + +$t->{REQUEST} = ( <<EOF +GET /12345.txt HTTP/1.1 +Connection: close, +Host: 123.example.org +EOF + ); +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.1', 'HTTP-Status' => 200, 'HTTP-Content' => '12345'."\n", 'Content-Type' => 'text/plain', 'Connection' => 'close' } ]; +ok($tf->handle_http($t) == 0, 'Connection-header, comma and space after value'); + +ok($tf->stop_proc == 0, "Stopping lighttpd"); + diff --git a/data/lighttpd/lighttpd-1.4.53/tests/run-tests.pl b/data/lighttpd/lighttpd-1.4.53/tests/run-tests.pl new file mode 100755 index 000000000..6136eac5b --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/run-tests.pl @@ -0,0 +1,20 @@ +#! /usr/bin/env perl + +use strict; + +use Test::Harness qw(&runtests $verbose); +$verbose = (defined $ENV{'VERBOSE'} ? $ENV{'VERBOSE'} : 0); +my $tests = (defined $ENV{'RUNTESTS'} ? $ENV{'RUNTESTS'} : ''); + +my $srcdir = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.'); + +opendir DIR, $srcdir; +my (@fs, $f); +while ($f = readdir(DIR)) { + if ($f =~ /^(.*)\.t$/) { + next if ($tests ne '' and $tests !~ /(^|\s+)$1(\s+|$)/); + push @fs, $srcdir.'/'.$f; + } +} +closedir DIR; +runtests (sort @fs); diff --git a/data/lighttpd/lighttpd-1.4.53/tests/scgi-responder.c b/data/lighttpd/lighttpd-1.4.53/tests/scgi-responder.c new file mode 100644 index 000000000..0c4244b77 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/scgi-responder.c @@ -0,0 +1,219 @@ +/* + * simple and trivial SCGI server with hard-coded results for use in unit tests + * - listens on STDIN_FILENO (socket on STDIN_FILENO must be set up by caller) + * - processes a single SCGI request at a time + * - arbitrary limitation: reads request headers netstring up to 64k in size + * - expect recv data for request headers netstring every 10ms or less + * - no read timeouts for request body; might block reading request body + * - no write timeouts; might block writing response + */ + +#include <sys/types.h> +#include <sys/socket.h> +#include <assert.h> +#include <errno.h> +#include <fcntl.h> +#include <limits.h> +#include <poll.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <unistd.h> + +#ifndef MSG_DONTWAIT +#define MSG_DONTWAIT 0 +#endif + +static int finished; +static char buf[65536]; + + +static char * +scgi_getenv(char *r, const unsigned long rlen, const char * const name) +{ + /* simple search; + * if many lookups are done, then should use more efficient data structure*/ + char * const end = r+rlen; + char *z; + const size_t len = strlen(name); + do { + if (0 == strcmp(r, name)) return r+len+1; + + z = memchr(r, '\0', (size_t)(end-r)); + if (NULL == z) return NULL; + z = memchr(z+1, '\0', (size_t)(end-r)); + if (NULL == z) return NULL; + r = z+1; + } while (r < end); + return NULL; +} + + +static void +scgi_process (const int fd) +{ + ssize_t rd = 0, offset = 0; + int num_requests = 1; + char *p = NULL, *r; + unsigned long rlen; + long long cl; + + assert(fd == STDOUT_FILENO); /*(required for response sent with printf())*/ + fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK); + + do { + struct pollfd pfd = { fd, POLLIN, 0 }; + switch (poll(&pfd, 1, 10)) { /* 10ms timeout */ + default: /* 1; the only pfd has revents */ + break; + case -1: /* error */ + case 0: /* timeout */ + pfd.revents |= POLLERR; + break; + } + if (!(pfd.revents & POLLIN)) + break; + do { + rd = recv(fd, buf+offset, sizeof(buf)-offset, MSG_DONTWAIT); + } while (rd < 0 && errno == EINTR); + if (rd > 0) + offset += rd; + else if (0 == rd) { + p = memchr(buf, ':', offset); + break; + } + else if (errno == EAGAIN || errno == EWOULDBLOCK) + continue; + else + break; + } while (NULL == (p = memchr(buf,':',offset)) && offset < 21); + if (NULL == p) + return; /* timeout or error receiving start of netstring */ + rlen = strtoul(buf, &p, 10); + if (*buf == '-' || *p != ':' || p == buf || rlen == ULONG_MAX) + return; /* invalid netstring (and rlen == ULONG_MAX is too long)*/ + if (rlen > sizeof(buf) - (p - buf) - 2) + return; /* netstring longer than arbitrary limit we accept here */ + rlen += (p - buf) + 2; + + while ((ssize_t)rlen < offset) { + struct pollfd pfd = { fd, POLLIN, 0 }; + switch (poll(&pfd, 1, 10)) { /* 10ms timeout */ + default: /* 1; the only pfd has revents */ + break; + case -1: /* error */ + case 0: /* timeout */ + pfd.revents |= POLLERR; + break; + } + if (!(pfd.revents & POLLIN)) + break; + do { + rd = recv(fd, buf+offset, sizeof(buf)-offset, MSG_DONTWAIT); + } while (rd < 0 && errno == EINTR); + if (rd > 0) + offset += rd; + else if (0 == rd) + break; + else if (errno == EAGAIN || errno == EWOULDBLOCK) + continue; + else + break; + } + if (offset < (ssize_t)rlen) + return; /* timeout or error receiving netstring */ + if (buf[rlen-1] != ',') + return; /* invalid netstring */ + rlen -= (p - buf) + 2; + r = p+1; + + /* not checking for empty headers in SCGI request (empty values allowed) */ + + /* SCGI request must contain "SCGI" header with value "1" */ + p = scgi_getenv(r, rlen, "SCGI"); + if (NULL == p || p[0] != '1' || p[1] != '\0') + return; /* missing or invalid SCGI header */ + + /* CONTENT_LENGTH must be first header in SCGI request; always required */ + if (0 != strcmp(r, "CONTENT_LENGTH")) + return; /* missing CONTENT_LENGTH */ + + errno = 0; + cl = strtoll(r+sizeof("CONTENT_LENGTH"), &p, 10); + if (*p != '\0' || p == r+sizeof("CONTENT_LENGTH") || cl < 0 || 0 != errno) + return; /* invalid CONTENT_LENGTH */ + + fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_NONBLOCK); + + /* read,discard request body (currently ignored in these SCGI unit tests) + * (make basic effort to read body; ignore any timeouts or errors here) */ + cl -= (offset - (r+rlen+1 - buf)); + while (cl > 0) { + char x[8192]; + do { + rd = recv(fd, x, (cl>(long long)sizeof(x)?sizeof(x):(size_t)cl), 0); + } while (rd < 0 && errno == EINTR); + if (rd <= 0) + break; + cl -= rd; + } + + /*(from fcgi-responder.c, substituting scgi_getenv() for getenv())*/ + { + if (NULL != (p = scgi_getenv(r, rlen, "QUERY_STRING"))) { + if (0 == strcmp(p, "lf")) { + printf("Status: 200 OK\n\n"); + } else if (0 == strcmp(p, "crlf")) { + printf("Status: 200 OK\r\n\r\n"); + } else if (0 == strcmp(p, "slow-lf")) { + printf("Status: 200 OK\n"); + fflush(stdout); + printf("\n"); + } else if (0 == strcmp(p,"slow-crlf")) { + printf("Status: 200 OK\r\n"); + fflush(stdout); + printf("\r\n"); + } else if (0 == strcmp(p, "die-at-end")) { + printf("Status: 200 OK\r\n\r\n"); + num_requests--; + } else { + printf("Status: 200 OK\r\n\r\n"); + } + } else { + printf("Status: 500 Internal Foo\r\n\r\n"); + } + + if (0 == strcmp(p, "path_info")) { + printf("%s", scgi_getenv(r, rlen, "PATH_INFO")); + } else if (0 == strcmp(p, "script_name")) { + printf("%s", scgi_getenv(r, rlen, "SCRIPT_NAME")); + } else if (0 == strcmp(p, "var")) { + p = scgi_getenv(r, rlen, "X_LIGHTTPD_FCGI_AUTH"); + printf("%s", p ? p : "(no value)"); + } else { + printf("test123"); + } + } + + fflush(stdout); + if (0 == num_requests) finished = 1; +} + + +int +main (void) +{ + int fd; + fcntl(STDIN_FILENO, F_SETFL, fcntl(STDIN_FILENO, F_GETFL) & ~O_NONBLOCK); + close(STDOUT_FILENO); /*(so that accept() returns fd to STDOUT_FILENO)*/ + + do { + fd = accept(STDIN_FILENO, NULL, NULL); + if (fd < 0) + continue; + assert(fd == STDOUT_FILENO); + scgi_process(fd); + } while (fd > 0 ? 0 == close(fd) && !finished : errno == EINTR); + + return 0; +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/scgi-responder.conf b/data/lighttpd/lighttpd-1.4.53/tests/scgi-responder.conf new file mode 100644 index 000000000..969913d2b --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/scgi-responder.conf @@ -0,0 +1,48 @@ +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +#debug.log-request-header = "enable" +#debug.log-response-header = "enable" +#debug.log-request-handling = "enable" + +## 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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" +server.tag = "Apache 1.3.29" + +server.modules = ( + "mod_scgi", + "mod_accesslog", +) + +accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log" + +scgi.debug = 0 +scgi.server = ( + ".scgi" => ( + "grisu" => ( + "host" => "127.0.0.1", + "port" => 10000, + "bin-path" => env.SRCDIR + "/scgi-responder", + "check-local" => "disable", + "max-procs" => 1, + "min-procs" => 1, + ), + ), +) + +$HTTP["host"] == "wsgi.example.org" { + scgi.server = ( + "/" => ( ( + "host" => "127.0.0.1", "port" => 10000, + "fix-root-scriptname" => "enable", + "check-local" => "disable", + "bin-path" => env.SRCDIR + "/scgi-responder", + "max-procs" => 1, + ) ), + ) +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/symlink.t b/data/lighttpd/lighttpd-1.4.53/tests/symlink.t new file mode 100755 index 000000000..9b275bd75 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/symlink.t @@ -0,0 +1,115 @@ +#!/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 => 10; +use LightyTest; + +my $tf = LightyTest->new(); +my $t; +my $docroot = $tf->{'TESTDIR'}."/tmp/lighttpd/servers/www.example.org/pages"; + +sub init_testbed { + return 0 unless eval { symlink("",""); 1 }; + my $f = "$docroot/index.html"; + my $l = "$docroot/index.xhtml"; + my $rc = undef; + unless (-l $l) { + return 0 unless symlink($f,$l); + }; + $f = "$docroot/expire"; + $l = "$docroot/symlinked"; + $rc = undef; + unless (-l $l) { + return 0 unless symlink($f,$l); + } + return 1; +}; + +SKIP: { + skip "perl does not support symlinking or setting up the symlinks failed.", 10 unless init_testbed; + ok($tf->start_proc == 0, "Starting lighttpd") or die(); + +# allow case +# simple file + $t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Host: symlink.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'allow: simple file'); + +# symlinked file + $t->{REQUEST} = ( <<EOF +GET /index.xhtml HTTP/1.0 +Host: symlink.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'allow: symlinked file'); + +# directly symlinked dir + $t->{REQUEST} = ( <<EOF +GET /symlinked/ HTTP/1.0 +Host: symlink.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'allow: directly symlinked dir'); + +# symlinked dir in path + $t->{REQUEST} = ( <<EOF +GET /symlinked/access.txt HTTP/1.0 +Host: symlink.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'allow: symlinked dir in path'); + +# deny case +# simple file + $t->{REQUEST} = ( <<EOF +GET /index.html HTTP/1.0 +Host: nosymlink.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; + ok($tf->handle_http($t) == 0, 'deny: simple file'); + +# symlinked file + $t->{REQUEST} = ( <<EOF +GET /index.xhtml HTTP/1.0 +Host: nosymlink.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; + ok($tf->handle_http($t) == 0, 'deny: symlinked file'); + +# directly symlinked dir + $t->{REQUEST} = ( <<EOF +GET /symlinked/ HTTP/1.0 +Host: nosymlink.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; + ok($tf->handle_http($t) == 0, 'deny: directly symlinked dir'); + +# symlinked dir in path + $t->{REQUEST} = ( <<EOF +GET /symlinked/access.txt HTTP/1.0 +Host: nosymlink.example.org +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ]; + ok($tf->handle_http($t) == 0, 'deny: symlinked dir in path'); + +# cleanup + ok($tf->stop_proc == 0, "Stopping lighttpd"); +}; diff --git a/data/lighttpd/lighttpd-1.4.53/tests/var-include-sub.conf b/data/lighttpd/lighttpd-1.4.53/tests/var-include-sub.conf new file mode 100644 index 000000000..d8f169697 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/var-include-sub.conf @@ -0,0 +1,38 @@ +# file to be included +$HTTP["host"] =~ "^" + server.name + "$" { + url.redirect = ( + "^/include$" => "/good_include", + "^/concat$" => "/good_" + "concat", + "^/servername1$" => "/good_" + server.name, + "^/servername2$" => server.name + "/good_", + "^/servername3$" => "/good_" + server.name + "/", + "^/var.myvar$" => "/good_var_myvar" + var.myvar, + "^/myvar$" => "/good_myvar" + myvar, + "^/number1$" => "/good_number" + one, + "^/number2$" => one + "/good_number", + "^/env$" => "/" + env.env_test, + ) + + num = 1 + num2 = 2 + num2 += 1 + + # without var prefix + mystr = "string" + mystr += "_append" + + # from parent + one += 1 + + url.redirect += ( + "^/array_append$" => "/good_array_append", + "^/string_append$" => "/good_" + mystr, + "^/number_append$" => "/good_" + one, + ) + + cmd = "echo cmd_ok=456" + include_shell cmd + url.redirect += ( + "^/include_shell$" => "/good_include_shell_" + cmd_ok, + ) +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/var-include.conf b/data/lighttpd/lighttpd-1.4.53/tests/var-include.conf new file mode 100644 index 000000000..e134c790c --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/var-include.conf @@ -0,0 +1,47 @@ + +debug.log-request-handling = "enable" +#debug.log-condition-handling = "enable" + +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + +## 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.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.log" +server.name = "www.example.org" +server.tag = "Apache 1.3.29" + + +server.modules = ( + "mod_redirect", + "mod_accesslog", +) + +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 = ( + "" => "/redirect", + ) +} + +$HTTP["host"] == "test.example.org" { + server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + server.name = "test.example.org" + var.myvar = "good" + var.one = 1 + include "var-include-sub.conf" +} diff --git a/data/lighttpd/lighttpd-1.4.53/tests/wrapper.sh b/data/lighttpd/lighttpd-1.4.53/tests/wrapper.sh new file mode 100755 index 000000000..571594c6a --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/tests/wrapper.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +## get some parameters from the makefile + +srcdir=$1 +top_builddir=$2 +export SHELL srcdir top_builddir + +exec $3 |