Browse Source

added a test for the 'don't pass Server from the backend server'

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@412 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.3.15
Jan Kneschke 17 years ago
parent
commit
a2373e71a9
  1. 10
      tests/mod-proxy.t
  2. 2
      tests/proxy.conf

10
tests/mod-proxy.t

@ -8,7 +8,7 @@ BEGIN {
use strict;
use IO::Socket;
use Test::More tests => 5;
use Test::More tests => 6;
use LightyTest;
my $tf_real = LightyTest->new();
@ -40,6 +40,14 @@ EOF
$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } );
ok($tf_proxy->handle_http($t) == 0, 'valid request');
$t->{REQUEST} = ( <<EOF
GET /phpinfo.php HTTP/1.0
Host: www.example.org
EOF
);
$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Server' => 'Proxy' } );
ok($tf_proxy->handle_http($t) == 0, 'drop Server from real server');
ok($tf_proxy->stop_proc == 0, "Stopping lighttpd proxy");
ok($tf_real->stop_proc == 0, "Stopping lighttpd");

2
tests/proxy.conf

@ -8,7 +8,7 @@ server.port = 2050
server.bind = "localhost"
server.errorlog = "/tmp/lighttpd/logs/lighttpd.error.log"
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
server.tag = "Proxy"
server.dir-listing = "enable"

Loading…
Cancel
Save