From b6413068e2bb650dc073700f90305889e54c7120 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 14 Sep 2009 17:14:50 +0200 Subject: tests:webserver: record the value of the server header field in a variable. Michael --- tests/scripts/webserver.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/scripts/webserver.pl b/tests/scripts/webserver.pl index 704a91d..19cd861 100755 --- a/tests/scripts/webserver.pl +++ b/tests/scripts/webserver.pl @@ -32,6 +32,8 @@ use Pod::Usage; use Fcntl ':flock'; # import LOCK_* constants my $VERSION = "0.1"; +my $NAME = "Tinyproxy-Test-Web-Server"; +my $server_header = "Server: $NAME/$VERSION"; my $EOL = "\015\012"; @@ -180,7 +182,7 @@ sub child_action($) { if ($request->{error}) { print $client "HTTP/1.0 400 Bad Request$EOL"; - print $client "Server: Tinyproxy-Test-Web-Server/$VERSION$EOL"; + print $client "$server_header$EOL"; print $client "Content-Type: text/html$EOL"; print $client "$EOL"; print $client "$EOL"; @@ -192,7 +194,7 @@ sub child_action($) { } print $client "HTTP/1.0 200 OK$EOL"; - print $client "Server: Tinyproxy-Test-Web-Server/$VERSION$EOL"; + print $client "$server_header$EOL"; print $client "Content-Type: text/html$EOL"; print $client "$EOL"; print $client "$EOL"; -- cgit v1.2.3