summaryrefslogtreecommitdiff
path: root/tests/mod-fastcgi.t
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2009-10-11 18:31:25 +0000
committerStefan Bühler <stbuehler@web.de>2009-10-11 18:31:25 +0000
commit17d0c36eed57e7a3b1c1cbf3da7ae5dc158edbde (patch)
tree41813a0b1dcc02571b3afd294e21fd375e8f6a80 /tests/mod-fastcgi.t
parenta55f82a3926d6f0b5829fcea6a4b43ca4798bc3d (diff)
downloadlighttpd-git-17d0c36eed57e7a3b1c1cbf3da7ae5dc158edbde.tar.gz
Read hostname from absolute uris in the request line (fixes #1937)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2631 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/mod-fastcgi.t')
-rwxr-xr-xtests/mod-fastcgi.t12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t
index b5f74d64..880344f2 100755
--- a/tests/mod-fastcgi.t
+++ b/tests/mod-fastcgi.t
@@ -7,7 +7,7 @@ BEGIN {
}
use strict;
-use Test::More tests => 53;
+use Test::More tests => 54;
use LightyTest;
my $tf = LightyTest->new();
@@ -25,7 +25,7 @@ SKIP: {
}
SKIP: {
- skip "no PHP running on port 1026", 30 unless $tf->listening_on(1026);
+ skip "no PHP running on port 1026", 31 unless $tf->listening_on(1026);
ok($tf->start_proc == 0, "Starting lighttpd") or goto cleanup;
@@ -188,6 +188,14 @@ 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)');
+
ok($tf->stop_proc == 0, "Stopping lighttpd");
$tf->{CONFIGFILE} = 'bug-06.conf';