hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r231512 - /jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java
Date Thu, 11 Aug 2005 20:50:39 GMT
Author: olegk
Date: Thu Aug 11 13:50:36 2005
New Revision: 231512

URL: http://svn.apache.org/viewcvs?rev=231512&view=rev
Log:
Minor tweak in the default connection reuse strategy

Modified:
    jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java

Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java?rev=231512&r1=231511&r2=231512&view=diff
==============================================================================
--- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java
(original)
+++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java
Thu Aug 11 13:50:36 2005
@@ -60,7 +60,7 @@
         HttpEntity entity = response.getEntity();
         HttpVersion ver = response.getStatusLine().getHttpVersion();
         if (entity != null) {
-            if (entity.getContentLength() < 0 && !entity.isChunked()) {
+            if (ver.lessEquals(HttpVersion.HTTP_1_0) && entity.getContentLength()
< 0) {
                 // if the content length is not known and is not chunk
                 // encoded, the connection cannot be reused
                 return false;



Mime
View raw message