Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0B089985D for ; Tue, 24 Apr 2012 15:44:26 +0000 (UTC) Received: (qmail 51017 invoked by uid 500); 24 Apr 2012 15:44:26 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 50983 invoked by uid 500); 24 Apr 2012 15:44:26 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 50976 invoked by uid 99); 24 Apr 2012 15:44:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 15:44:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2012 15:44:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E9C8E2388A32 for ; Tue, 24 Apr 2012 15:44:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120424154401.E9C8E2388A32@eris.apache.org> 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 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 + + 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); }