vmassol     01/09/05 01:40:53

  Modified:    cactus/src/framework/share/org/apache/commons/cactus/client
                        HttpClientHelper.java
  Log:
  corrected bug #3427 : disable follow redirects in the Cactus HTTP client (thanks to 
Tony Payne)
  
  Revision  Changes    Path
  1.9       +10 -1     
jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/client/HttpClientHelper.java
  
  Index: HttpClientHelper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/client/HttpClientHelper.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HttpClientHelper.java     2001/08/31 16:55:51     1.8
  +++ HttpClientHelper.java     2001/09/05 08:40:53     1.9
  @@ -70,7 +70,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: HttpClientHelper.java,v 1.8 2001/08/31 16:55:51 vmassol Exp $
  + * @version $Id: HttpClientHelper.java,v 1.9 2001/09/05 08:40:53 vmassol Exp $
    */
   public class HttpClientHelper
   {
  @@ -84,6 +84,15 @@
        * The URL that will be used for the HTTP connection.
        */
       private String url;
  +
  +    // Static initialisations
  +    static {
  +
  +        // Do not follow redirects (because we are doing unit tests and
  +        // we need to be able to assert the returned headers, cookies, ...)
  +        HttpURLConnection.setFollowRedirects(false);
  +
  +    }
   
       /**
        * @param theURL the URL that will be used for the HTTP connection.
  
  
  

Reply via email to