+ Ref #263
This commit is contained in:
parent
54e2d0e86f
commit
8c1dec439e
|
@ -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 {
|
||||||
$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 ($@) {
|
if ($@) {
|
||||||
$self->{output}->add_option_msg(short_msg => 'issue to load proxypac: ' . $@);
|
$self->{output}->add_option_msg(short_msg => 'issue to load proxypac: ' . $@);
|
||||||
|
|
Loading…
Reference in New Issue