Do not attempt to update the auth state if not valid
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@627483 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c37994ffb2
commit
44cb5c03e0
|
@ -70,6 +70,10 @@ public class AuthState {
|
|||
this.credentials = null;
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return this.authScheme != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns the given {@link AuthScheme authentication scheme}.
|
||||
*
|
||||
|
|
|
@ -985,6 +985,10 @@ public class DefaultClientRequestDirector
|
|||
final HttpHost host,
|
||||
final CredentialsProvider credsProvider) {
|
||||
|
||||
if (!authState.isValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String hostname = host.getHostName();
|
||||
int port = host.getPort();
|
||||
if (port < 0) {
|
||||
|
|
Loading…
Reference in New Issue