commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestGetMethodLocal.java TestHttps.java TestMethodsExternalHost.java TestMethodsLocalHost.java TestWebappBasicAuth.java TestWebappCookie.java TestWebappHeaders.java TestWebappMethods.java TestWebappParameters.java TestWebappRedirect.java
Date Sun, 02 Feb 2003 11:05:21 GMT
olegk       2003/02/02 03:05:20

  Modified:    httpclient/src/examples ChunkEncodedPost.java
                        UnbufferedPost.java
               httpclient/src/test/org/apache/commons/httpclient
                        TestGetMethodLocal.java TestHttps.java
                        TestMethodsExternalHost.java
                        TestMethodsLocalHost.java TestWebappBasicAuth.java
                        TestWebappCookie.java TestWebappHeaders.java
                        TestWebappMethods.java TestWebappParameters.java
                        TestWebappRedirect.java
  Log:
  Remove deprecated methods in test cases and examples
  
  Revision  Changes    Path
  1.4       +3 -4      jakarta-commons/httpclient/src/examples/ChunkEncodedPost.java
  
  Index: ChunkEncodedPost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/examples/ChunkEncodedPost.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ChunkEncodedPost.java	2 Feb 2003 00:04:15 -0000	1.3
  +++ ChunkEncodedPost.java	2 Feb 2003 11:05:19 -0000	1.4
  @@ -81,7 +81,6 @@
       HttpClient client = new HttpClient();
   
       PostMethod httppost = new PostMethod("http://localhost:8080/httpclienttest/body");
  -    httppost.setUseDisk(false);
   
       httppost.setRequestBody(new FileInputStream(new File(args[0])));
       httppost.setRequestContentLength(PostMethod.CONTENT_LENGTH_CHUNKED);
  
  
  
  1.2       +3 -4      jakarta-commons/httpclient/src/examples/UnbufferedPost.java
  
  Index: UnbufferedPost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/examples/UnbufferedPost.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UnbufferedPost.java	2 Feb 2003 00:04:15 -0000	1.1
  +++ UnbufferedPost.java	2 Feb 2003 11:05:19 -0000	1.2
  @@ -81,7 +81,6 @@
       HttpClient client = new HttpClient();
   
       PostMethod httppost = new PostMethod("http://localhost:8080/httpclienttest/body");
  -    httppost.setUseDisk(false);
   
       File file = new File(args[0]);
       httppost.setRequestBody(new FileInputStream(file));
  
  
  
  1.9       +8 -31     jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestGetMethodLocal.java
  
  Index: TestGetMethodLocal.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestGetMethodLocal.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestGetMethodLocal.java	23 Jan 2003 22:48:25 -0000	1.8
  +++ TestGetMethodLocal.java	2 Feb 2003 11:05:19 -0000	1.9
  @@ -142,35 +142,12 @@
               getTestContext());
       }
   
  -    public void testGetSlashWithoutDisk() {
  +    public void testGetSlash() {
           HttpClient client = new HttpClient();
           client.getHostConfiguration().setHost(host, port, "http");
   
           GetMethod method = new GetMethod("/");
  -        method.setUseDisk(false);
  -        try {
  -            client.executeMethod(method);
  -        } catch (Throwable t) {
  -            t.printStackTrace();
  -            fail("Unable to execute method : " + t.toString());
  -        }
  -
  -        try {
  -            String data = method.getResponseBodyAsString();
  -            assertTrue("No data returned.",(data.length() > 0));
  -        } catch (Throwable t) {
  -            t.printStackTrace();
  -            fail("Unable to execute method : " + t.toString());
  -        }
  -        assertEquals(200,method.getStatusCode());
  -    }
  -
  -    public void testGetSlashWithDisk() {
  -        HttpClient client = new HttpClient();
  -        client.getHostConfiguration().setHost(host, port, "http");
  -
  -        GetMethod method = new GetMethod("/");
  -        method.setUseDisk(true);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -193,7 +170,7 @@
           client.getHostConfiguration().setHost(host, port, "http");
   
           GetMethod method = new GetMethod("/");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -236,7 +213,7 @@
           client.getHostConfiguration().setHost(host, port, "http");
   
           GetMethod method = new GetMethod("/i/am/assuming/this/path/and/file/doesnt/exist/on/the/web/server.xyzzy");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  
  
  
  1.9       +6 -6      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHttps.java
  
  Index: TestHttps.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHttps.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestHttps.java	23 Jan 2003 22:48:27 -0000	1.8
  +++ TestHttps.java	2 Feb 2003 11:05:19 -0000	1.9
  @@ -124,7 +124,7 @@
               client.getHostConfiguration().setProxy(PROXY_HOST, Integer.parseInt(PROXY_PORT));
           }
           GetMethod method = new GetMethod(_urlWithPort);
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -153,7 +153,7 @@
               client.getHostConfiguration().setProxy(PROXY_HOST, Integer.parseInt(PROXY_PORT));
           }
           GetMethod method = new GetMethod(_urlWithoutPort);
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  
  
  
  1.8       +5 -6      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java
  
  Index: TestMethodsExternalHost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestMethodsExternalHost.java	23 Jan 2003 22:48:27 -0000	1.7
  +++ TestMethodsExternalHost.java	2 Feb 2003 11:05:19 -0000	1.8
  @@ -158,7 +158,7 @@
           }
   
           GetMethod method = new GetMethod("/");
  -        method.setUseDisk(false);
  +        
   
           try {
               client.executeMethod(method);
  @@ -179,7 +179,6 @@
   
           method.recycle();
           method.setPath(externalPath);
  -        method.setUseDisk(true);
   
           try {
               client.executeMethod(method);
  
  
  
  1.11      +5 -6      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestMethodsLocalHost.java
  
  Index: TestMethodsLocalHost.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestMethodsLocalHost.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TestMethodsLocalHost.java	23 Jan 2003 22:48:27 -0000	1.10
  +++ TestMethodsLocalHost.java	2 Feb 2003 11:05:20 -0000	1.11
  @@ -152,7 +152,7 @@
   	    client.getHostConfiguration().setHost(host, port, "http");
   
           GetMethod method = new GetMethod("/");
  -        method.setUseDisk(false);
  +        
   
           try {
               client.executeMethod(method);
  @@ -173,7 +173,6 @@
   
           method.recycle();
           method.setPath("/index.html");
  -        method.setUseDisk(true);
   
           try {
               client.executeMethod(method);
  
  
  
  1.9       +8 -8      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappBasicAuth.java
  
  Index: TestWebappBasicAuth.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappBasicAuth.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestWebappBasicAuth.java	31 Jan 2003 23:23:17 -0000	1.8
  +++ TestWebappBasicAuth.java	2 Feb 2003 11:05:20 -0000	1.9
  @@ -111,7 +111,7 @@
           client.getState().setCredentials("BasicAuthServlet",new UsernamePasswordCredentials("jakarta","commons"));
   	    client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/auth/basic");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -141,7 +141,7 @@
   	    client.getHostConfiguration().setHost(host, port, "http");
           PostMethod method = new PostMethod("/" + context + "/auth/basic");
           method.setRequestBody(new NameValuePair[] { new NameValuePair("testing","one")
} );
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -199,7 +199,7 @@
           HttpClient client = new HttpClient();
   	    client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/auth/basic");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -229,7 +229,7 @@
           HttpClient client = new HttpClient();
   	    client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/auth/basic");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  
  
  
  1.9       +30 -30    jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappCookie.java
  
  Index: TestWebappCookie.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappCookie.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestWebappCookie.java	31 Jan 2003 23:23:17 -0000	1.8
  +++ TestWebappCookie.java	2 Feb 2003 11:05:20 -0000	1.9
  @@ -112,7 +112,7 @@
           client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/cookie/write");
           method.setQueryString("simple=set");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -132,7 +132,7 @@
           client.getHostConfiguration().setHost(host, port, "http");
           PostMethod method = new PostMethod("/" + context + "/cookie/write");
           method.setRequestBody(new NameValuePair[] { new NameValuePair("simple","set") }
);
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -172,7 +172,7 @@
           client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/cookie/write");
           method.setQueryString("simple=unset");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -208,7 +208,7 @@
           client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/cookie/write");
           method.setQueryString("simple=set");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -223,7 +223,7 @@
           assertEquals("value",((Cookie)(client.getState().getCookies()[0])).getValue());
   
           method.recycle();
  -        method.setUseDisk(false);
  +        
           method.setPath("/" + context + "/cookie/write");
           method.setQueryString("simple=unset");
           try {
  @@ -243,7 +243,7 @@
           client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/cookie/write");
           method.setQueryString("simple=set&domain=set");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -289,7 +289,7 @@
           client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/cookie/write");
           method.setQueryString("simple=set");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -304,7 +304,7 @@
           assertEquals("value",((Cookie)(client.getState().getCookies()[0])).getValue());
   
           GetMethod method2 = new GetMethod("/" + context + "/cookie/read");
  -        method2.setUseDisk(false);
  +        
           try {
               client.executeMethod(method2);
           } catch (Throwable t) {
  @@ -323,7 +323,7 @@
           client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/cookie/write");
           method.setQueryString("simple=set&domain=set");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -341,7 +341,7 @@
           assertEquals("value",((Cookie)(client.getState().getCookies()[1])).getValue());
   
           GetMethod method2 = new GetMethod("/" + context + "/cookie/read");
  -        method2.setUseDisk(false);
  +        
           try {
               client.executeMethod(method2);
           } catch (Throwable t) {
  @@ -363,7 +363,7 @@
           {
               GetMethod method = new GetMethod("/" + context + "/cookie/write");
               method.setQueryString("simple=set&domain=set");
  -            method.setUseDisk(false);
  +            
               try {
                   client.executeMethod(method);
               } catch (Throwable t) {
  @@ -383,7 +383,7 @@
   
           {
               GetMethod method2 = new GetMethod("/" + context + "/cookie/read");
  -            method2.setUseDisk(false);
  +            
               try {
                   client.executeMethod(method2);
               } catch (Throwable t) {
  @@ -400,7 +400,7 @@
   
           {
               GetMethod method3 = new GetMethod("/" + context + "/cookie/write");
  -            method3.setUseDisk(false);
  +
               method3.setQueryString("simple=unset");
               try {
                   client.executeMethod(method3);
  @@ -418,7 +418,7 @@
   
           {
               GetMethod method4 = new GetMethod("/" + context + "/cookie/read");
  -            method4.setUseDisk(false);
  +
               try {
                   client.executeMethod(method4);
               } catch (Throwable t) {
  @@ -517,7 +517,7 @@
           {
               GetMethod method = new GetMethod("/" + context + "/cookie/write");
               method.setQueryString("path=/");
  -            method.setUseDisk(false);
  +            
               try {
                   client.executeMethod(method);
               } catch (Throwable t) {
  @@ -533,7 +533,7 @@
   
           {
               GetMethod method = new GetMethod("/" + context + "/cookie/read");
  -            method.setUseDisk(false);
  +            
               try {
                   client.executeMethod(method);
               } catch (Throwable t) {
  @@ -555,7 +555,7 @@
           {
               GetMethod method = new GetMethod("/" + context + "/cookie/write");
               method.setQueryString("path=/" + context);
  -            method.setUseDisk(false);
  +            
               try {
                   client.executeMethod(method);
               } catch (Throwable t) {
  @@ -571,7 +571,7 @@
   
           {
               GetMethod method = new GetMethod("/" + context + "/cookie/read");
  -            method.setUseDisk(false);
  +            
               try {
                   client.executeMethod(method);
               } catch (Throwable t) {
  @@ -592,7 +592,7 @@
           {
               GetMethod method = new GetMethod("/" + context + "/cookie/write");
               method.setQueryString("path=/" + context + "/cookie");
  -            method.setUseDisk(false);
  +            
               try {
                   client.executeMethod(method);
               } catch (Throwable t) {
  @@ -608,7 +608,7 @@
   
           {
               GetMethod method = new GetMethod("/" + context + "/cookie/read");
  -            method.setUseDisk(false);
  +            
               try {
                   client.executeMethod(method);
               } catch (Throwable t) {
  @@ -630,7 +630,7 @@
           {
               GetMethod method = new GetMethod("/" + context + "/cookie/write");
               method.setQueryString("path=/" + context + "/cookie/write");
  -            method.setUseDisk(false);
  +            
               try {
                   client.executeMethod(method);
               } catch (Throwable t) {
  @@ -646,7 +646,7 @@
   
           {
               GetMethod method = new GetMethod("/" + context + "/cookie/read");
  -            method.setUseDisk(false);
  +            
               try {
                   client.executeMethod(method);
               } catch (Throwable t) {
  @@ -669,7 +669,7 @@
           	client.getState().setCookiePolicy(CookiePolicy.RFC2109);
   	        GetMethod method = new GetMethod("/" + context + "/cookie/write");
   	        method.setQueryString("simple=set");
  -	        method.setUseDisk(false);
  +	        
   	        try {
   	            client.executeMethod(method);
   	        } catch (Throwable t) {
  @@ -684,7 +684,7 @@
   	        assertEquals("value",((Cookie)(client.getState().getCookies()[0])).getValue());
   	
   	        GetMethod method2 = new GetMethod("/" + context + "/cookie/read");
  -	        method2.setUseDisk(false);
  +	        
   	        try {
   	            client.executeMethod(method2);
   	        } catch (Throwable t) {
  @@ -702,7 +702,7 @@
           	client.getState().setCookiePolicy(CookiePolicy.COMPATIBILITY);
   	        GetMethod method = new GetMethod("/" + context + "/cookie/write");
   	        method.setQueryString("simple=set");
  -	        method.setUseDisk(false);
  +	        
   	        try {
   	            client.executeMethod(method);
   	        } catch (Throwable t) {
  @@ -717,7 +717,7 @@
   	        assertEquals("value",((Cookie)(client.getState().getCookies()[0])).getValue());
   	
   	        GetMethod method2 = new GetMethod("/" + context + "/cookie/read");
  -	        method2.setUseDisk(false);
  +	        
   	        try {
   	            client.executeMethod(method2);
   	        } catch (Throwable t) {
  
  
  
  1.8       +8 -8      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappHeaders.java
  
  Index: TestWebappHeaders.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappHeaders.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestWebappHeaders.java	23 Jan 2003 22:48:28 -0000	1.7
  +++ TestWebappHeaders.java	2 Feb 2003 11:05:20 -0000	1.8
  @@ -112,7 +112,7 @@
           GetMethod method = new GetMethod("/" + context + "/headers");
           method.setRequestHeader(new Header("addRequestHeader(Header)","True"));
           method.setRequestHeader("addRequestHeader(String,String)","Also True");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -133,7 +133,7 @@
           GetMethod method = new GetMethod("/" + context + "/headers");
           method.setRequestHeader(new Header("XXX-A-HEADER","true"));
           method.removeRequestHeader("XXX-A-HEADER");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -153,7 +153,7 @@
           GetMethod method = new GetMethod("/" + context + "/headers");
           method.setRequestHeader(new Header("xxx-a-header","one"));
           method.setRequestHeader("XXX-A-HEADER","two");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -171,7 +171,7 @@
           HttpClient client = new HttpClient();
   	    client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/headers");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  
  
  
  1.13      +12 -12    jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappMethods.java
  
  Index: TestWebappMethods.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappMethods.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TestWebappMethods.java	31 Jan 2003 23:23:17 -0000	1.12
  +++ TestWebappMethods.java	2 Feb 2003 11:05:20 -0000	1.13
  @@ -111,7 +111,7 @@
           HttpClient client = new HttpClient();
           client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/params");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -141,7 +141,7 @@
           HttpClient client = new HttpClient();
           client.getHostConfiguration().setHost(host, port, "http");
           PostMethod method = new PostMethod("/" + context + "/params");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -297,7 +297,7 @@
           HttpClient client = new HttpClient();
           client.getHostConfiguration().setHost(host, port, "http");
           PostMethod method = new PostMethod("/" + context + "/body");
  -        method.setUseDisk(false);
  +        
           method.setRequestBody(new NameValuePair[] { 
              new NameValuePair("quote","It was the best of times, it was the worst of times.")
} );
           try {
  @@ -314,7 +314,7 @@
           HttpClient client = new HttpClient();
           client.getHostConfiguration().setHost(host, port, "http");
           PostMethod method = new PostMethod("/" + context + "/body");
  -        method.setUseDisk(false);
  +        
           method.setRequestBody("quote=It+was+the+best+of+times%2C+it+was+the+worst+of+times.");
           try {
               client.executeMethod(method);
  @@ -331,7 +331,7 @@
           HttpClient client = new HttpClient();
           client.getHostConfiguration().setHost(host, port, "http");
           PostMethod method = new PostMethod("/" + context + "/body");
  -        method.setUseDisk(false);
  +        
           String bodyStr = "quote=It+was+the+best+of+times%2C+it+was+the+worst+of+times.";
   		byte[] body = HttpConstants.getContentBytes(bodyStr);
   
  @@ -352,7 +352,7 @@
           HttpClient client = new HttpClient();
           client.getHostConfiguration().setHost(host, port, "http");
           PostMethod method = new PostMethod("/" + context + "/body");
  -        method.setUseDisk(false);
  +        
           String body = "quote=It+was+the+best+of+times%2C+it+was+the+worst+of+times.";
           method.setRequestBody(body);
           method.setRequestContentLength(PostMethod.CONTENT_LENGTH_AUTO);
  @@ -371,7 +371,7 @@
           HttpClient client = new HttpClient();
           client.getHostConfiguration().setHost(host, port, "http");
           PostMethod method = new PostMethod("/" + context + "/body");
  -        method.setUseDisk(false);
  +        
           String body = "quote=It+was+the+best+of+times%2C+it+was+the+worst+of+times.";
           method.setRequestBody(body);
           method.setRequestContentLength(PostMethod.CONTENT_LENGTH_CHUNKED);
  @@ -406,7 +406,7 @@
           HttpClient client = new HttpClient();
           client.getHostConfiguration().setHost(host, port, "http");
           PostMethod method = new PostMethod("/" + context + "/body");
  -        method.setUseDisk(false);
  +        
           String bodyStr = "Like, hello, and stuff";
           byte [] body = HttpConstants.getContentBytes(bodyStr);
           method.setRequestHeader("Content-Type", "text/plain");
  
  
  
  1.9       +12 -12    jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappParameters.java
  
  Index: TestWebappParameters.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappParameters.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestWebappParameters.java	31 Jan 2003 23:23:18 -0000	1.8
  +++ TestWebappParameters.java	2 Feb 2003 11:05:20 -0000	1.9
  @@ -111,7 +111,7 @@
   	    client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/params");
           method.setQueryString("?hadQuestionMark=true");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -132,7 +132,7 @@
   	    client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/params");
           method.setQueryString("hadQuestionMark=false");
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -153,7 +153,7 @@
   	    client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/params");
           method.setQueryString(new NameValuePair[] { new NameValuePair("param-one","param-value")
});
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -178,7 +178,7 @@
                                   new NameValuePair("param-two","param-value2"),
                                   new NameValuePair("special-chars",":/?~.")
                                 });
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -201,7 +201,7 @@
   	    client.getHostConfiguration().setHost(host, port, "http");
           GetMethod method = new GetMethod("/" + context + "/params");
           method.setQueryString(new NameValuePair[] { new NameValuePair("param-without-value",null)
});
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -225,7 +225,7 @@
                                     new NameValuePair("foo","one"),
                                     new NameValuePair("foo","two")
                                });
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -247,7 +247,7 @@
                                     new NameValuePair("param","eter"),
                                     new NameValuePair("para","meter")
                                });
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -274,7 +274,7 @@
           method.setRequestBody(new NameValuePair[] { 
              new NameValuePair("param","eter"),
              new NameValuePair("para","meter") } );
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  
  
  
  1.17      +6 -6      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappRedirect.java
  
  Index: TestWebappRedirect.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebappRedirect.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TestWebappRedirect.java	1 Feb 2003 20:40:03 -0000	1.16
  +++ TestWebappRedirect.java	2 Feb 2003 11:05:20 -0000	1.17
  @@ -233,7 +233,7 @@
           method.setRequestBody(new ByteArrayInputStream(body));
           method.setRequestContentLength(body.length);  //unbuffered request
           method.setFollowRedirects(true);
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  @@ -248,7 +248,7 @@
           method.setRequestBody(new ByteArrayInputStream(body));
           method.setRequestContentLength(PostMethod.CONTENT_LENGTH_AUTO); //buffered request
           method.setFollowRedirects(true);
  -        method.setUseDisk(false);
  +        
           try {
               client.executeMethod(method);
           } catch (Throwable t) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message