From dc74f419888a2bddf67ca5572a81942bb05e6a94 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 13 Feb 2020 15:12:31 +0100 Subject: [PATCH] fix proxyurl lwp notice --- centreon/plugins/backend/http/lwp.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/centreon/plugins/backend/http/lwp.pm b/centreon/plugins/backend/http/lwp.pm index c4ed8b09a..93d93ee7a 100644 --- a/centreon/plugins/backend/http/lwp.pm +++ b/centreon/plugins/backend/http/lwp.pm @@ -109,7 +109,8 @@ sub set_proxy { } if (defined($options{request}->{proxyurl}) && $options{request}->{proxyurl} ne '') { my $proxyurl = $options{request}->{proxyurl}; - if ($options{request}->{proto} eq "https" || $options{request}->{full_url} =~ /^https/) { + if ($options{request}->{proto} eq "https" || + (defined($options{request}->{full_url}) && $options{request}->{full_url} =~ /^https/)) { $proxyurl = 'connect://' . $2 if ($proxyurl =~ /^(http|https):\/\/(.*)/); } $self->{ua}->proxy(['http', 'https'], $proxyurl);