summaryrefslogtreecommitdiff
path: root/tests/scripts
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-09-14 17:14:50 +0200
committerMichael Adam <obnox@samba.org>2009-09-14 22:12:30 +0200
commitb6413068e2bb650dc073700f90305889e54c7120 (patch)
tree947aa0ad0b5b516813be25dd0b91538d8701d2c0 /tests/scripts
parent96303e10f39a379fef0f4262d33334057f9d2aef (diff)
downloadtinyproxy-b6413068e2bb650dc073700f90305889e54c7120.tar.gz
tinyproxy-b6413068e2bb650dc073700f90305889e54c7120.zip
tests:webserver: record the value of the server header field in a variable.
Michael
Diffstat (limited to '')
-rwxr-xr-xtests/scripts/webserver.pl6
1 files changed, 4 insertions, 2 deletions
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 "<html>$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 "<html>$EOL";