Index: mozilla/webtools/bugzilla/Bugzilla/Config/Common.pm =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/Common.pm,v retrieving revision 1.11 diff -u -r1.11 mozilla/webtools/bugzilla/Bugzilla/Config/Common.pm --- mozilla/webtools/bugzilla/Bugzilla/Config/Common.pm +++ mozilla/webtools/bugzilla/Bugzilla/Config/Common.pm @@ -97,16 +97,25 @@ return "must be a legal URL, that starts with https and ends with a slash."; } my $host = $1; - if ($host =~ /:\d+$/) { - return "must not contain a port."; + my $port = 443; + if ($host =~ /:(\d+)$/) { + $port = $1; } local *SOCK; my $proto = getprotobyname('tcp'); socket(SOCK, PF_INET, SOCK_STREAM, $proto); - my $sin = sockaddr_in(443, inet_aton($host)); + my $sin = sockaddr_in($port, inet_aton($host)); if (!connect(SOCK, $sin)) { return "Failed to connect to " . html_quote($host) . - ":443, unable to enable SSL."; + ":$port, unable to enable SSL."; + } + eval('use LWP::UserAgent;'); + my $req = HTTP::Request->new(GET => $url); + my $ua = LWP::UserAgent->new; + my $res = $ua->request($req); + unless ($res->is_success) { + return "Failed to connect to " . html_quote($url) . + "unable to enable SSL."; } } return "";