|
Lines 311-317
sub _load {
Link Here
|
| 311 |
|
311 |
|
| 312 |
sub _load_xml_args { |
312 |
sub _load_xml_args { |
| 313 |
my $self = shift; |
313 |
my $self = shift; |
| 314 |
return $_[1]? { 'string' => $_[1]//'' }: { 'location' => $_[0]//'' }; |
314 |
my $https_code = $self->_https_workaround(@_); |
|
|
315 |
return $https_code || $_[1]? |
| 316 |
{ 'string' => $https_code // $_[1] }: { 'location' => $_[0]//'' }; |
| 317 |
} |
| 318 |
|
| 319 |
sub _https_workaround { # Routine added for bug 12758 (part 1) |
| 320 |
my ( $self, $file, $code ) = @_; |
| 321 |
return if $file!~/^https/i; |
| 322 |
require LWP::UserAgent; |
| 323 |
my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 } ); |
| 324 |
my $resp = $ua->get( $file ); |
| 325 |
return $resp->decoded_content if $resp->is_success; #undef otherwise |
| 315 |
} |
326 |
} |
| 316 |
|
327 |
|
| 317 |
# _set_error |
328 |
# _set_error |
| 318 |
- |
|
|