mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-22 10:01:32 +00:00
HTTPCLIENT-1442: Authentication header set by the user gets removed in case of proxy authentication
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1548547 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ae429fab28
commit
a86424fc43
@ -1,6 +1,10 @@
|
||||
Changes since 4.3.1
|
||||
-------------------
|
||||
|
||||
* [HTTPCLIENT-1442] Authentication header set by the user gets removed in case
|
||||
of proxy authentication (affects plan HTTP requests only).
|
||||
Contributed by Oleg Kalnichevski <olegk at apache.org>
|
||||
|
||||
* [HTTPCLIENT-1441] Caching AsynchronousValidationRequest leaks connections.
|
||||
Contributed by Dominic Tootell <dominic.tootell at gmail.com>
|
||||
|
||||
|
@ -293,8 +293,13 @@ public CloseableHttpResponse execute(
|
||||
}
|
||||
}
|
||||
// discard previous auth headers
|
||||
request.removeHeaders(AUTH.WWW_AUTH_RESP);
|
||||
request.removeHeaders(AUTH.PROXY_AUTH_RESP);
|
||||
final HttpRequest original = request.getOriginal();
|
||||
if (!original.containsHeader(AUTH.WWW_AUTH_RESP)) {
|
||||
request.removeHeaders(AUTH.WWW_AUTH_RESP);
|
||||
}
|
||||
if (!original.containsHeader(AUTH.PROXY_AUTH_RESP)) {
|
||||
request.removeHeaders(AUTH.PROXY_AUTH_RESP);
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user