mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 07:34:35 +02:00
+ Ref #263
This commit is contained in:
parent
d63f7c0800
commit
caefa85d40
@ -155,7 +155,11 @@ sub set_proxy {
|
|||||||
error_msg => "Cannot load module 'HTTP::ProxyPAC'.");
|
error_msg => "Cannot load module 'HTTP::ProxyPAC'.");
|
||||||
my $pac;
|
my $pac;
|
||||||
eval {
|
eval {
|
||||||
|
if ($options{request}->{proxypac} =~ /^(http|https):\/\//) {
|
||||||
|
$pac = HTTP::ProxyPAC->new(URI->new($options{request}->{proxypac}));
|
||||||
|
} else {
|
||||||
$pac = HTTP::ProxyPAC->new($options{request}->{proxypac});
|
$pac = HTTP::ProxyPAC->new($options{request}->{proxypac});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
if ($@) {
|
if ($@) {
|
||||||
$self->{output}->add_option_msg(short_msg => 'issue to load proxypac: ' . $@);
|
$self->{output}->add_option_msg(short_msg => 'issue to load proxypac: ' . $@);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user