hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1421833 - in /httpcomponents/httpclient/branches/4.2.x: RELEASE_NOTES.txt httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultHttpClient.java
Date Fri, 14 Dec 2012 12:54:25 GMT
Author: olegk
Date: Fri Dec 14 12:54:24 2012
New Revision: 1421833

URL: http://svn.apache.org/viewvc?rev=1421833&view=rev
Log:
SystemDefaultHttpClient misinterprets 'http.keepAlive' default value and disables connection
persistence if the system property is not set. This causes connection based authentication
schemes such as NTLM to fail.

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

Modified: httpcomponents/httpclient/branches/4.2.x/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.2.x/RELEASE_NOTES.txt?rev=1421833&r1=1421832&r2=1421833&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.2.x/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/branches/4.2.x/RELEASE_NOTES.txt Fri Dec 14 12:54:24 2012
@@ -1,6 +1,10 @@
 Changes since 4.2.2
 -------------------
 
+* SystemDefaultHttpClient misinterprets 'http.keepAlive' default value and disables
+  connection persistence if the system property is not set. This causes connection
+  based authentication schemes such as NTLM to fail.
+
 * [HTTPCLIENT-1276] cache update on a 304 response causes NPE. 
   Contributed by Francois-Xavier Bonnet <francois-xavier.bonnet at centraliens.net>

 

Modified: httpcomponents/httpclient/branches/4.2.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultHttpClient.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.2.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultHttpClient.java?rev=1421833&r1=1421832&r2=1421833&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.2.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultHttpClient.java
(original)
+++ httpcomponents/httpclient/branches/4.2.x/httpclient/src/main/java/org/apache/http/impl/client/SystemDefaultHttpClient.java
Fri Dec 14 12:54:24 2012
@@ -117,7 +117,7 @@ public class SystemDefaultHttpClient ext
     protected ClientConnectionManager createClientConnectionManager() {
         PoolingClientConnectionManager connmgr = new PoolingClientConnectionManager(
                 SchemeRegistryFactory.createSystemDefault());
-        String s = System.getProperty("http.keepAlive");
+        String s = System.getProperty("http.keepAlive", "true");
         if ("true".equalsIgnoreCase(s)) {
             s = System.getProperty("http.maxConnections", "5");
             int max = Integer.parseInt(s);
@@ -135,7 +135,7 @@ public class SystemDefaultHttpClient ext
 
     @Override
     protected ConnectionReuseStrategy createConnectionReuseStrategy() {
-        String s = System.getProperty("http.keepAlive");
+        String s = System.getProperty("http.keepAlive", "true");
         if ("true".equalsIgnoreCase(s)) {
             return new DefaultConnectionReuseStrategy();
         } else {



Mime
View raw message