mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-13 13:35:54 +00:00
HTTPCLIENT-1142: Infinite loop on NTLM authentication failure
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1197194 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7541429cf2
commit
ae8e671030
@ -1,3 +1,10 @@
|
||||
Changes since 4.2 ALPHA1
|
||||
-------------------
|
||||
|
||||
* [HTTPCLIENT-1142] Infinite loop on NTLM authentication failure.
|
||||
Contributed by Oleg Kalnichevski <olegk at apache.org>
|
||||
|
||||
|
||||
Release 4.2 ALPHA1
|
||||
-------------------
|
||||
|
||||
|
@ -105,6 +105,7 @@ public boolean authenticate(
|
||||
authState.reset();
|
||||
break;
|
||||
case CHALLENGED:
|
||||
case HANDSHAKE:
|
||||
if (authScheme == null) {
|
||||
this.log.debug("Auth scheme is null");
|
||||
authStrategy.authFailed(host, authState.getAuthScheme(), context);
|
||||
@ -137,6 +138,9 @@ public boolean authenticate(
|
||||
}
|
||||
Queue<AuthOption> authOptions = authStrategy.select(challenges, host, response, context);
|
||||
if (authOptions != null && !authOptions.isEmpty()) {
|
||||
if (this.log.isDebugEnabled()) {
|
||||
this.log.debug("Selected authorization options: " + authOptions);
|
||||
}
|
||||
authState.setState(AuthProtocolState.CHALLENGED);
|
||||
authState.update(authOptions);
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user