hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r537382 - /jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
Date Sat, 12 May 2007 10:44:14 GMT
Author: olegk
Date: Sat May 12 03:44:13 2007
New Revision: 537382

URL: http://svn.apache.org/viewvc?view=rev&rev=537382
Log:
Make sure redirect response body is fully consumed, if present

Modified:
    jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/impl/client/DefaultClientRequestDirector.java

Modified: jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/impl/client/DefaultClientRequestDirector.java?view=diff&rev=537382&r1=537381&r2=537382
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
(original)
+++ jakarta/httpcomponents/httpclient/trunk/src/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
Sat May 12 03:44:13 2007
@@ -549,6 +549,12 @@
                     (proxy != null),
                     (proxy != null));
 
+            // Make sure redirect response body is fully consumed, if present
+            HttpEntity entity = response.getEntity();
+            if (entity != null) {
+                entity.consumeContent();
+            }
+            
             HttpGet redirect = new HttpGet(uri);
             
             if (LOG.isDebugEnabled()) {



Mime
View raw message