Permalink
Browse files

Merge pull request #33 from spencerhakim/fix-tunnel-module-headers

HTTP Tunnel module - Properly capitalize "Basic" authentication type when sending header
  • Loading branch information...
2 parents fce818b + 1de7d4f commit d0937442717560012c13e00dbf1c0fa28efe0c5f @jcameron jcameron committed Dec 3, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 tunnel/link.cgi
View
@@ -72,19 +72,19 @@ $con = &make_http_connection($host, $port, $ssl, $meth, $path);
# Send request headers
&write_http_connection($con, "Host: $host\r\n");
-&write_http_connection($con, "User-agent: Webmin\r\n");
+&write_http_connection($con, "User-Agent: Webmin\r\n");
if ($user) {
$auth = &encode_base64("$user:$pass");
$auth =~ s/\n//g;
- &write_http_connection($con, "Authorization: basic $auth\r\n");
+ &write_http_connection($con, "Authorization: Basic $auth\r\n");
}
&write_http_connection($con, sprintf(
"Webmin-servers: %s://%s:%d/$module_name/\n",
$ENV{'HTTPS'} eq "ON" ? "https" : "http",
$ENV{'SERVER_NAME'}, $ENV{'SERVER_PORT'}));
$cl = $ENV{'CONTENT_LENGTH'};
-&write_http_connection($con, "Content-length: $cl\r\n") if ($cl);
-&write_http_connection($con, "Content-type: $ENV{'CONTENT_TYPE'}\r\n")
+&write_http_connection($con, "Content-Length: $cl\r\n") if ($cl);
+&write_http_connection($con, "Content-Type: $ENV{'CONTENT_TYPE'}\r\n")
if ($ENV{'CONTENT_TYPE'});
&write_http_connection($con, "\r\n");
if ($cl) {

0 comments on commit d093744

Please sign in to comment.