From 611a4b401fce2979a485476787afb136acf86af9 Mon Sep 17 00:00:00 2001
From: Don Armstrong
Date: Wed, 21 Jun 2017 19:16:12 -0700
Subject: [PATCH] Include the protocol (http://) in gWebDomain and gCGIDomain
We now include the protocol so that we can easily specify all https links
instead of http links.
---
Debbugs/CGI/Pkgreport.pm | 8 ++++----
Debbugs/Config.pm | 13 +++++++------
Debbugs/Control.pm | 2 +-
html/index.html.in | 20 ++++++++++----------
html/server-request.html.in | 2 +-
scripts/config.in.default | 2 +-
scripts/mailsummary | 2 +-
scripts/process | 2 +-
scripts/receive | 8 ++++----
scripts/service | 6 +++---
scripts/text | 2 +-
templates/en_US/cgi/bugreport.tmpl | 2 +-
templates/en_US/cgi/no_such_bug.tmpl | 2 +-
templates/en_US/html/html_tail.tmpl | 2 +-
templates/en_US/mail/process_no_package.tmpl | 2 +-
15 files changed, 38 insertions(+), 37 deletions(-)
diff --git a/Debbugs/CGI/Pkgreport.pm b/Debbugs/CGI/Pkgreport.pm
index 3e9cb3f..4391197 100644
--- a/Debbugs/CGI/Pkgreport.pm
+++ b/Debbugs/CGI/Pkgreport.pm
@@ -128,7 +128,7 @@ sub generate_package_info{
my @references;
my $pseudodesc = getpseudodesc();
if ($package and defined($pseudodesc) and exists($pseudodesc->{$package})) {
- push @references, "to the ".
+ push @references, "to the ".
"list of other pseudo-packages";
}
elsif (not defined $maint and not @{$param{bugs}}) {
@@ -141,14 +141,14 @@ sub generate_package_info{
else {
if ($package and defined $config{package_pages} and length $config{package_pages}) {
push @references, sprintf "to the %s package page",
- html_escape("http://$config{package_pages}/$package"), html_escape("$package");
+ html_escape("$config{package_pages}/$package"), html_escape("$package");
}
if (defined $config{subscription_domain} and
length $config{subscription_domain}) {
my $ptslink = $param{binary} ? $srcforpkg : $package;
# the pts only wants the source, and doesn't care about src: (#566089)
$ptslink =~ s/^src://;
- push @references, q(to the Package Tracking System);
+ push @references, q(to the Package Tracking System);
}
# Only output this if the source listing is non-trivial.
if ($param{binary} and $srcforpkg) {
@@ -166,7 +166,7 @@ sub generate_package_info{
if (defined $maint) {
print {$output} "If you find a bug not listed here, please\n";
printf {$output} "report it.
\n",
- html_escape("http://$config{web_domain}/Reporting$config{html_suffix}");
+ html_escape("$config{web_domain}/Reporting$config{html_suffix}");
}
return decode_utf8($output_scalar);
}
diff --git a/Debbugs/Config.pm b/Debbugs/Config.pm
index 454db35..c40b74d 100644
--- a/Debbugs/Config.pm
+++ b/Debbugs/Config.pm
@@ -151,12 +151,13 @@ set_default(\%config,'web_host_bug_dir','');
=item web_domain $gWebDomain
-Full path of the web domain where bugs are kept, defaults to the
-concatenation of L and L
+Full path of the web domain where bugs are kept including the protocol (http://
+or https://). Defaults to the concatenation of 'http://', L and
+L
=cut
-set_default(\%config,'web_domain',$config{web_host}.($config{web_host}=~m{/$}?'':'/').$config{web_host_bug_dir});
+set_default(\%config,'web_domain','http://'.$config{web_host}.($config{web_host}=~m{/$}?'':'/').$config{web_host_bug_dir});
=item html_suffix $gHTMLSuffix
@@ -169,7 +170,7 @@ set_default(\%config,'html_suffix','.html');
=item cgi_domain $gCGIDomain
Full path of the web domain where cgi scripts are kept. Defaults to
-the concatentation of L and cgi.
+the concatentation of L and cgi.
=cut
@@ -984,7 +985,7 @@ libravatar.cgi, our internal federated libravatar system.
=cut
-set_default(\%config,'libravatar_uri','http://'.$config{cgi_domain}.'/libravatar.cgi?email=');
+set_default(\%config,'libravatar_uri',$config{cgi_domain}.'/libravatar.cgi?email=');
=item libravatar_uri_options $gLibravatarUriOptions
@@ -1081,7 +1082,7 @@ set_default(\%config,'html_tail',<
- Debian $config{bug} tracking system
+ Debian $config{bug} tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.
diff --git a/Debbugs/Control.pm b/Debbugs/Control.pm
index 2378ea1..aaa8925 100644
--- a/Debbugs/Control.pm
+++ b/Debbugs/Control.pm
@@ -3835,7 +3835,7 @@ sub __message_body_template{
$extra_var ||={};
my $hole_var = {'&bugurl' =>
sub{"$_[0]: ".
- 'http://'.$config{cgi_domain}.'/'.
+ $config{cgi_domain}.'/'.
Debbugs::CGI::bug_links(bug => $_[0],
links_only => 1,
);
diff --git a/html/index.html.in b/html/index.html.in
index d1b5682..5e8b466 100644
--- a/html/index.html.in
+++ b/html/index.html.in
@@ -36,13 +36,13 @@ $gHTMLCopies
Find a bug by number:
-
-
{$config{project}} {$config{bug}} report logs - #{$bug_num}
There is no record of {$config{bug}} #{$bug_num}.
-Try the search page instead.
+Try the search page instead.
{#include('html/html_tail')}