diff options
Diffstat (limited to 'tests/scripts/webserver.pl')
-rwxr-xr-x | tests/scripts/webserver.pl | 6 |
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"; |