diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2020-01-19 22:10:46 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-07-08 19:54:29 -0400 |
commit | c8a1cba0c1f337d9a7ae9108226952abb34424ef (patch) | |
tree | c7f228883b9df19715d325bd54616c2cc5ad6011 /tests | |
parent | 8b7e110973cb411a29c580d16d3c65cd2d8a4ab8 (diff) | |
download | lighttpd-git-c8a1cba0c1f337d9a7ae9108226952abb34424ef.tar.gz |
[tests] t/test_mod_userdir
create t/test_mod_userdir to replace sparse tests in tests/mod-userdir.t
remove tests/mod-userdir.t
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rwxr-xr-x | tests/mod-userdir.t | 58 |
2 files changed, 0 insertions, 59 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 1582be86..af901c9e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -46,7 +46,6 @@ CONFS=\ mod-secdownload.t \ mod-setenv.t \ mod-ssi.t \ - mod-userdir.t \ proxy.conf \ request.t \ scgi-responder.conf \ diff --git a/tests/mod-userdir.t b/tests/mod-userdir.t deleted file mode 100755 index 52f9c32f..00000000 --- a/tests/mod-userdir.t +++ /dev/null @@ -1,58 +0,0 @@ -#!/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"); - |