Include webprefix in webmin paths

This commit is contained in:
Jamie Cameron
2019-02-04 11:11:07 -08:00
parent 3e5fcb3b10
commit 132803dbcb

View File

@@ -108,9 +108,10 @@ my $http_prot = $ENV{'HTTPS'} eq "ON" ? "https" : "http";
$http_prot, $http_host, $http_port,
$tconfig{'inframe'} ? "" : "$module_name/"));
&write_http_connection($con, sprintf(
"Webmin-path: %s://%s:%d/%s/link.cgi%s\n",
"Webmin-path: %s://%s:%d%s/%s/link.cgi%s\n",
$http_prot, $http_host, $http_port,
$module_name, $ENV{'PATH_INFO'}));
$gconfig{'webprefix'}, $module_name,
$ENV{'PATH_INFO'}));
if ($ENV{'HTTP_WEBMIN_PATH'}) {
&write_http_connection($con, sprintf(
"Complete-webmin-path: %s%s\n",
@@ -118,9 +119,10 @@ if ($ENV{'HTTP_WEBMIN_PATH'}) {
}
else {
&write_http_connection($con, sprintf(
"Complete-webmin-path: %s://%s:%d/%s/link.cgi%s\n",
"Complete-webmin-path: %s://%s:%d%s/%s/link.cgi%s\n",
$http_prot, $http_host, $http_port,
$module_name, $ENV{'PATH_INFO'}));
$gconfig{'webprefix'}, $module_name,
$ENV{'PATH_INFO'}));
}
my $cl = $ENV{'CONTENT_LENGTH'};
&write_http_connection($con, "Content-length: $cl\r\n") if ($cl);