HTTPCLIENT-1186: State of newly created connections in the connection pool is not always correctly updated potentially allowing those connections to be leased to users with a different security context

Contributed by Ralf Pöhlmann <rpn at methodpark.de>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1329811 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2012-04-24 15:55:07 +00:00
parent 9366926296
commit 63d06f06cd
2 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,11 @@
Changes since 4.2 BETA1
-------------------
* [HTTPCLIENT-1186] State of newly created connections in the connection pool is not always
correctly updated potentially allowing those connections to be leased to users with a different
security context.
Contributed by Ralf Pöhlmann <rpn at methodpark.de>
* [HTTPCLIENT-1179] Upgraded Commons Codec dependency to version 1.6
Contributed by Oleg Kalnichevski <olegk at apache.org>

View File

@ -576,9 +576,11 @@ public class DefaultRequestDirector implements RequestDirector {
roureq = followup;
}
if (managedConn != null && userToken == null) {
if (managedConn != null) {
if (userToken == null) {
userToken = userTokenHandler.getUserToken(context);
context.setAttribute(ClientContext.USER_TOKEN, userToken);
}
if (userToken != null) {
managedConn.setState(userToken);
}