target cannot be null here otherwise the earlier invocation of target.getPort() would fail with NPE
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1435320 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5bdd456c8c
commit
0730d6c7c9
|
@ -92,7 +92,7 @@ public class RequestAuthCache implements HttpRequestInterceptor {
|
||||||
}
|
}
|
||||||
|
|
||||||
final AuthState targetState = clientContext.getTargetAuthState();
|
final AuthState targetState = clientContext.getTargetAuthState();
|
||||||
if (target != null && targetState != null && targetState.getState() == AuthProtocolState.UNCHALLENGED) {
|
if (targetState != null && targetState.getState() == AuthProtocolState.UNCHALLENGED) {
|
||||||
final AuthScheme authScheme = authCache.get(target);
|
final AuthScheme authScheme = authCache.get(target);
|
||||||
if (authScheme != null) {
|
if (authScheme != null) {
|
||||||
doPreemptiveAuth(target, authScheme, targetState, credsProvider);
|
doPreemptiveAuth(target, authScheme, targetState, credsProvider);
|
||||||
|
|
Loading…
Reference in New Issue