You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by mb...@apache.org on 2003/09/06 16:41:25 UTC

cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestResponseHeaders.java

mbecke      2003/09/06 07:41:25

  Modified:    httpclient/src/test/org/apache/commons/httpclient
                        TestResponseHeaders.java
  Log:
  Fixed failing test case testDuplicateProxyConnection.  Caused by changes to NoHostHttpConnectionManager.
  
  Revision  Changes    Path
  1.10      +9 -11     jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestResponseHeaders.java
  
  Index: TestResponseHeaders.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestResponseHeaders.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestResponseHeaders.java	12 Aug 2003 02:35:17 -0000	1.9
  +++ TestResponseHeaders.java	6 Sep 2003 14:41:25 -0000	1.10
  @@ -62,12 +62,11 @@
   
   package org.apache.commons.httpclient;
   
  -import org.apache.commons.httpclient.methods.GetMethod;
  -
   import junit.framework.Test;
  -import junit.framework.TestCase;
   import junit.framework.TestSuite;
   
  +import org.apache.commons.httpclient.methods.GetMethod;
  +
   /**
    * Tests for reading response headers.
    *
  @@ -133,6 +132,8 @@
   
       public void testDuplicateProxyConnection() throws Exception {
           
  +        client.getHostConfiguration().setProxy("proxy", 1);
  +
           String headers = 
               "HTTP/1.1 200 OK\r\n"
               + "proxy-connection: close\r\n"
  @@ -141,8 +142,7 @@
               + "\r\n";
   
           conn.addResponse(headers, "");
  -        conn.setProxyHost("proxy");
  -        conn.setProxyPort(1);
  +
           GetMethod method = new GetMethod("/");
           client.executeMethod(method);
           method.getResponseBodyAsString();
  @@ -157,8 +157,6 @@
               + "\r\n";
   
           conn.addResponse(headers, "");
  -        conn.setProxyHost("proxy");
  -        conn.setProxyPort(1);
           method = new GetMethod("/");
           client.executeMethod(method);
           method.getResponseBodyAsString();