tests:webserver: correctly answer http/0.9 requests by sending no headers

Michael
This commit is contained in:
Michael Adam 2009-10-10 20:57:07 +02:00
parent 07d993cbc1
commit cbe52ca43c

View File

@ -193,10 +193,13 @@ sub child_action($) {
return;
}
print $client "HTTP/1.0 200 OK$EOL";
print $client "$server_header$EOL";
print $client "Content-Type: text/html$EOL";
print $client "$EOL";
if ($request->{version} ne "0.9") {
print $client "HTTP/1.0 200 OK$EOL";
print $client "$server_header$EOL";
print $client "Content-Type: text/html$EOL";
print $client "$EOL";
}
print $client "<html>$EOL";
print $client "<h1>Tinyproxy test WEB server</h1>$EOL";
print $client "<h2>Fortune</h2>$EOL";