vonahok opened a new pull request #223:
URL: https://github.com/apache/httpcomponents-client/pull/223
… proxy authentication failure.
The failure was caused by unnecessary null check `authChallenge.getValue()`
throwing a MalformedChallengeException in the method
`org.apache.hc.client5.http.impl.auth.NTLMScheme# processChallenge` :
```
@Override
public void processChallenge(
final AuthChallenge authChallenge,
final HttpContext context) throws MalformedChallengeException {
Args.notNull(authChallenge, "AuthChallenge");
if (authChallenge.getValue() == null) { <----------------- NOT
NECESSARY CHECK
throw new MalformedChallengeException("Missing auth challenge");
}
this.challenge = authChallenge.getValue();
if (this.challenge == null || this.challenge.isEmpty()) { <---
CORRECT CONDITION CHECK
if (this.state == State.UNINITIATED) {
this.state = State.CHALLENGE_RECEIVED;
} else {
this.state = State.FAILED;
}
} else {
if (this.state.compareTo(State.MSG_TYPE1_GENERATED) < 0) {
this.state = State.FAILED;
throw new MalformedChallengeException("Out of sequence NTLM
response message");
} else if (this.state == State.MSG_TYPE1_GENERATED) {
this.state = State.MSG_TYPE2_RECEVIED;
}
}
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]