juergen     2003/01/20 03:34:22

  Modified:    
testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor
                        TProcessors.java
  Log:
  set the content length to 0,  just in case no body is delivered.
  
  Revision  Changes    Path
  1.44      +28 -4     
jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/TProcessors.java
  
  Index: TProcessors.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/testsuite/testsuite/junit/src/org/apache/slide/testsuite/testtools/tprocessor/TProcessors.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- TProcessors.java  19 Dec 2002 12:10:41 -0000      1.43
  +++ TProcessors.java  20 Jan 2003 11:34:22 -0000      1.44
  @@ -257,6 +257,29 @@
   //                e.printStackTrace();
   //            }
   //        }
  +//
  +//        for (int i=0; i<10000; i++)
  +//        {
  +//        HttpClient client = new HttpClient();
  +//        HttpState state = new WebdavState();
  +//        Credentials cred = new UsernamePasswordCredentials("yyy", "yyy");
  +//        client.startSession("xxxx", 4000);
  +//        state.setCredentials(null, cred);
  +//        client.setState(state);
  +//        PutMethod method = new 
PutMethod("/taminowebdavserver/mypictures/aaa.txt");
  +//        String s = "Hello this is a test in one line that is longer 
12345677890\n";
  +//        s = s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s+s;
  +//        byte[] body = s.getBytes();
  +//        method.setRequestHeader("Content-Length", ""+body.length);
  +//        method.setRequestBody(body);
  +//            try {
  +//                client.executeMethod(method);
  +//                client.endSession();
  +//            } catch (java.io.IOException e) {
  +//                e.printStackTrace();
  +//            }
  +//        }
  +//            System.exit (-1);
   
   
           if (!mainExecuter(args, null, null)) {
  @@ -897,6 +920,7 @@
           throws Exception {
           StringTokenizer st = new 
StringTokenizer(replaceKnownVariable(methodElement));
           method = HttpMethodFactory(st.nextToken(), st.nextToken());
  +        method.setRequestHeader("Content-Length", "0");
           return method;
       }
   
  
  
  

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

Reply via email to