summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Util.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r--Bugzilla/Util.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 48ac06502..00f9b0a05 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -277,7 +277,16 @@ sub correct_urlbase {
my $urlbase = Bugzilla->params->{'urlbase'};
my $sslbase = Bugzilla->params->{'sslbase'};
- return ($ssl && $sslbase) ? $sslbase : $urlbase;
+ if (!$sslbase) {
+ return $urlbase;
+ }
+ elsif ($ssl) {
+ return $sslbase;
+ }
+ else {
+ # Return what the user currently uses.
+ return (uc($ENV{HTTPS} || '') eq 'ON') ? $sslbase : $urlbase;
+ }
}
sub use_attachbase {