From a2373e71a90b44d691a8021e0056fb4a3bebcf2f Mon Sep 17 00:00:00 2001 From: Jan Kneschke Date: Tue, 28 Jun 2005 17:25:35 +0000 Subject: [PATCH] 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 --- tests/mod-proxy.t | 10 +++++++++- tests/proxy.conf | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/mod-proxy.t b/tests/mod-proxy.t index ac1db0f3..2c5a1270 100755 --- a/tests/mod-proxy.t +++ b/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} = ( <{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"); diff --git a/tests/proxy.conf b/tests/proxy.conf index 78371903..891e0ebc 100644 --- a/tests/proxy.conf +++ b/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"