This commit is contained in:
garnier-quentin 2016-01-05 11:22:46 +01:00
parent d63f7c0800
commit caefa85d40
1 changed files with 5 additions and 1 deletions

View File

@ -155,7 +155,11 @@ sub set_proxy {
error_msg => "Cannot load module 'HTTP::ProxyPAC'.");
my $pac;
eval {
$pac = HTTP::ProxyPAC->new($options{request}->{proxypac});
if ($options{request}->{proxypac} =~ /^(http|https):\/\//) {
$pac = HTTP::ProxyPAC->new(URI->new($options{request}->{proxypac}));
} else {
$pac = HTTP::ProxyPAC->new($options{request}->{proxypac});
}
};
if ($@) {
$self->{output}->add_option_msg(short_msg => 'issue to load proxypac: ' . $@);