summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-09-02 07:20:08 +0200
committerByron Jones <glob@mozilla.com>2014-09-02 07:20:08 +0200
commit77f0ebaaa700f0b3254b1adde77deb2c15a74c4c (patch)
treec7fad71c487c9b4a5f572ae815230537a277c72e
parent66aaf86644c2e2d649a2fc1a7074cef577eefa70 (diff)
downloadbugzilla-77f0ebaaa700f0b3254b1adde77deb2c15a74c4c.tar.gz
bugzilla-77f0ebaaa700f0b3254b1adde77deb2c15a74c4c.tar.xz
Bug 1056162: add bit.ly support to bmo
-rw-r--r--extensions/Bitly/lib/WebService.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/extensions/Bitly/lib/WebService.pm b/extensions/Bitly/lib/WebService.pm
index ce235c913..e721103b0 100644
--- a/extensions/Bitly/lib/WebService.pm
+++ b/extensions/Bitly/lib/WebService.pm
@@ -102,6 +102,14 @@ sub _bitly {
# request
my $ua = LWP::UserAgent->new(agent => 'Bugzilla');
+ $ua->timeout(10);
+ $ua->protocols_allowed(['http', 'https']);
+ if (my $proxy_url = Bugzilla->params->{proxy_url}) {
+ $ua->proxy(['http', 'https'], $proxy_url);
+ }
+ else {
+ $ua->env_proxy();
+ }
my $response = $ua->get($bitly_url);
if ($response->is_error) {
ThrowUserError('bitly_failure', { message => $response->message });