summaryrefslogtreecommitdiff
path: root/tests/request.t
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2011-04-04 22:39:48 +0000
committerStefan Bühler <stbuehler@web.de>2011-04-04 22:39:48 +0000
commitbf0d57d5058b35b47f4038aac91f1d6296b225d1 (patch)
tree4e7119682b9e38d8978de78dd980661f4ada2880 /tests/request.t
parentf610f894a35b5ef0e082b9f3bd24fa338bb10147 (diff)
downloadlighttpd1.4-bf0d57d5058b35b47f4038aac91f1d6296b225d1.tar.gz
lighttpd1.4-bf0d57d5058b35b47f4038aac91f1d6296b225d1.zip
two additional test cases for absolute http(s) uris in the request line
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2787 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/request.t')
-rwxr-xr-xtests/request.t17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/request.t b/tests/request.t
index 1960f5d6..5c2dfd5b 100755
--- a/tests/request.t
+++ b/tests/request.t
@@ -8,7 +8,7 @@ BEGIN {
use strict;
use IO::Socket;
-use Test::More tests => 42;
+use Test::More tests => 44;
use LightyTest;
my $tf = LightyTest->new();
@@ -89,6 +89,21 @@ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '-HTTP
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
);