hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1329803 - in /httpcomponents/httpclient/branches/4.1.x: RELEASE_NOTES.txt httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
Date Tue, 24 Apr 2012 15:44:01 GMT
Author: olegk
Date: Tue Apr 24 15:44:01 2012
New Revision: 1329803

URL: http://svn.apache.org/viewvc?rev=1329803&view=rev
Log:
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>

Modified:
    httpcomponents/httpclient/branches/4.1.x/RELEASE_NOTES.txt
    httpcomponents/httpclient/branches/4.1.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java

Modified: httpcomponents/httpclient/branches/4.1.x/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.1.x/RELEASE_NOTES.txt?rev=1329803&r1=1329802&r2=1329803&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.1.x/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/branches/4.1.x/RELEASE_NOTES.txt Tue Apr 24 15:44:01 2012
@@ -1,3 +1,12 @@
+Changes since 4.1.3
+-------------------
+
+* [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> 
+
+
 Release 4.1.3
 -------------------
 

Modified: httpcomponents/httpclient/branches/4.1.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.1.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java?rev=1329803&r1=1329802&r2=1329803&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.1.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
(original)
+++ httpcomponents/httpclient/branches/4.1.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
Tue Apr 24 15:44:01 2012
@@ -512,9 +512,11 @@ public class DefaultRequestDirector impl
                     roureq = followup;
                 }
 
-                if (managedConn != null && userToken == null) {
-                    userToken = userTokenHandler.getUserToken(context);
-                    context.setAttribute(ClientContext.USER_TOKEN, userToken);
+                if (managedConn != null) {
+                    if (userToken == null) {
+                        userToken = userTokenHandler.getUserToken(context);
+                        context.setAttribute(ClientContext.USER_TOKEN, userToken);
+                    }
                     if (userToken != null) {
                         managedConn.setState(userToken);
                     }



Mime
View raw message