diff options
Diffstat (limited to 'tests/scripts')
-rwxr-xr-x | tests/scripts/webclient.pl | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/scripts/webclient.pl b/tests/scripts/webclient.pl index 84d8790..c9186c2 100755 --- a/tests/scripts/webclient.pl +++ b/tests/scripts/webclient.pl @@ -62,25 +62,24 @@ sub build_request($$$$$) if ($method ne 'GET') { die "invalid method '$method'"; } - $request = "$method $document$EOL" - . "$EOL"; + $request = "$method $document$EOL"; } elsif ($version eq '1.0') { if ($method ne 'GET') { die "invalid method '$method'"; } $request = "$method $document HTTP/$version$EOL" - . $user_agent_header - . "$EOL"; + . $user_agent_header; } elsif ($version eq '1.1') { $request = "$method $document HTTP/$version$EOL" . "Host: $host" . (($port and ($port ne $default_port))?":$port":"") . "$EOL" . $user_agent_header - . "Connection: close$EOL" - . "$EOL"; + . "Connection: close$EOL"; } else { die "invalid version '$version'"; } + $request .= $EOL; + return $request; } |