summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-11-30 06:40:37 +0100
committerByron Jones <glob@mozilla.com>2015-11-30 06:40:37 +0100
commit36283093128fc1f32d3562418f00c2763269cb11 (patch)
tree0177e9f2d000c3728bd3930f854a7fbdba3bd3fe
parent4e97b5b50641a9c5f450d5b75bd03e7767a0ef84 (diff)
downloadbugzilla-36283093128fc1f32d3562418f00c2763269cb11.tar.gz
bugzilla-36283093128fc1f32d3562418f00c2763269cb11.tar.xz
Bug 1228910 - sentry.pl doesn't use the dc-proxy
-rwxr-xr-xsentry.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/sentry.pl b/sentry.pl
index f5c05f613..95cd1846f 100755
--- a/sentry.pl
+++ b/sentry.pl
@@ -42,6 +42,11 @@ my $uri = URI->new(Bugzilla->params->{sentry_uri});
my $header = build_header($uri);
exit(1) unless $header;
+my $ua = LWP::UserAgent->new(timeout => 10);
+if (my $proxy_url = Bugzilla->params->{proxy_url}) {
+ $ua->proxy(['http', 'https'], $proxy_url);
+}
+
flock(DATA, LOCK_EX);
foreach my $file (glob(bz_locations()->{error_reports} . '/*.dump')) {
eval {
@@ -82,7 +87,7 @@ sub send_file {
# and post to sentry
my $request = POST $uri->canonical, %$header, Content => $message;
- my $response = LWP::UserAgent->new(timeout => 10)->request($request);
+ my $response = $ua->request($request);
}
__DATA__