If self{address} exists, use that instead of concatenating host + port
parent
0cfd860856
commit
833cc41b0b
|
@ -398,7 +398,7 @@ sub get_realm {
|
|||
if ( $$self{realm} ne $tokens{realm} ) {
|
||||
$$self{realm} = $tokens{realm};
|
||||
Debug("Changing REALM to $$self{realm}, $$self{host}:$$self{port}, $$self{realm}, $$self{username}, $$self{password}");
|
||||
$self->{ua}->credentials("$$self{host}:$$self{port}", $$self{realm}, $$self{username}, $$self{password});
|
||||
$self->{ua}->credentials($$self{address}?$$self{address}:"$$self{host}:$$self{port}", $$self{realm}, $$self{username}, $$self{password});
|
||||
$response = $self->get($url);
|
||||
if ( !$response->is_success() ) {
|
||||
Debug('Authentication still failed after updating REALM' . $response->status_line);
|
||||
|
@ -417,9 +417,10 @@ sub get_realm {
|
|||
} # end if
|
||||
} # end foreach auth header
|
||||
} else {
|
||||
debug('No headers line');
|
||||
Debug('No headers line');
|
||||
} # end if headers
|
||||
} # end if not authen
|
||||
return undef;
|
||||
} # end sub get_realm
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in New Issue