summaryrefslogtreecommitdiffstats
path: root/Bugzilla/BugUrl
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-06-08 07:11:32 +0200
committerByron Jones <glob@mozilla.com>2015-06-08 07:11:32 +0200
commitf4c8d62859f29338803ce5321029e330f8b28031 (patch)
treeeb1b0bcec7c93a70a435c3df46cdf642a92b3edb /Bugzilla/BugUrl
parentbd2e246adfc0a09677c8e27edff2c0a02c39e7cf (diff)
downloadbugzilla-f4c8d62859f29338803ce5321029e330f8b28031.tar.gz
bugzilla-f4c8d62859f29338803ce5321029e330f8b28031.tar.xz
Bug 1167919: See Also: support debbugs.gnu.org tracker
r=glob,a=glob
Diffstat (limited to 'Bugzilla/BugUrl')
-rw-r--r--Bugzilla/BugUrl/Debian.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/BugUrl/Debian.pm b/Bugzilla/BugUrl/Debian.pm
index 2b611aa57..b726b0b5a 100644
--- a/Bugzilla/BugUrl/Debian.pm
+++ b/Bugzilla/BugUrl/Debian.pm
@@ -23,7 +23,10 @@ sub should_handle {
# Debian BTS URLs can look like various things:
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1234
# http://bugs.debian.org/1234
- return (lc($uri->authority) eq 'bugs.debian.org'
+ # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=123
+ # https://debbugs.gnu.org/123
+ return ((lc($uri->authority) eq 'bugs.debian.org'
+ or lc($uri->authority) eq 'debbugs.gnu.org')
and (($uri->path =~ /bugreport\.cgi$/
and $uri->query_param('bug') =~ m|^\d+$|)
or $uri->path =~ m|^/\d+$|)) ? 1 : 0;
@@ -37,7 +40,7 @@ sub _check_value {
# This is the shortest standard URL form for Debian BTS URLs,
# and so we reduce all URLs to this.
$uri->path =~ m|^/(\d+)$| || $uri->query_param('bug') =~ m|^(\d+)$|;
- $uri = new URI("http://bugs.debian.org/$1");
+ $uri = new URI('https://' . $uri->authority . '/' . $1);
return $uri;
}