oglueck     2002/10/15 06:29:42

  Modified:    httpclient/src/java/org/apache/commons/httpclient
                        HttpMethodBase.java
  Log:
  Fixed a hang on redirect
  
  Revision  Changes    Path
  1.64      +8 -4      
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java
  
  Index: HttpMethodBase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- HttpMethodBase.java       13 Oct 2002 19:01:05 -0000      1.63
  +++ HttpMethodBase.java       15 Oct 2002 13:29:41 -0000      1.64
  @@ -889,6 +889,10 @@
   
               //close connection if required
               closeConnection(conn);
  +            if (conn.isOpen()) {
  +                //throw away body to position the stream after the response
  +                getResponseBodyAsString();
  +            }
           } //end of loop
   
           log.error("Narrowly avoided an infinite loop in execute");
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to