rlubke      02/01/11 14:01:55

  Modified:    src/tools/org/apache/tomcat/task GTest.java
  Log:
   - Updates to GTest to support new tests.
  
  Revision  Changes    Path
  1.10      +17 -13    jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java
  
  Index: GTest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- GTest.java        4 Jan 2002 21:19:37 -0000       1.9
  +++ GTest.java        11 Jan 2002 22:01:55 -0000      1.10
  @@ -400,7 +400,11 @@
        */
       public void setRequestHeaders( String s ) {
           requestHeaders = new HashMap();
  -        getHeaderDetails( s, requestHeaders, true );
  +        StringTokenizer tok = new StringTokenizer( s, "|" );
  +        while ( tok.hasMoreElements() ) {
  +            String header = (String) tok.nextElement();
  +            getHeaderDetails( header, requestHeaders, true );
  +        }
       }
   
       /**
  @@ -780,18 +784,18 @@
                
                   while ( iter.hasNext() ) {
                       String headerKey = ( String ) iter.next();
  -                 ArrayList values = (ArrayList) requestHeaders.get( headerKey );
  -                 String[] value = (String[]) values.toArray( new String[ 
values.size() ] );
  -                 for ( int i = 0; i < value.length; i++ ) {
  -                     StringBuffer sb = new StringBuffer( 25 );
  -                     sb.append( headerKey );
  -                     sb.append( ": " );
  -                     sb.append( value[ i ] );
  -                     pw.println( sb.toString() );
  -                     if ( debug > 0 ) {
  -                         System.out.println( sb.toString() );
  -                     }
  -                 }
  +                         ArrayList values = (ArrayList) requestHeaders.get( 
headerKey );
  +                         String[] value = (String[]) values.toArray( new String[ 
values.size() ] );
  +                         for ( int i = 0; i < value.length; i++ ) {
  +                                 StringBuffer sb = new StringBuffer( 25 );
  +                                 sb.append( headerKey );
  +                                 sb.append( ": " );
  +                                 sb.append( value[ i ] );
  +                                 pw.println( sb.toString() );
  +                                 if ( debug > 0 ) {
  +                                     System.out.println( " REQUEST HEADER: " + 
sb.toString() );
  +                                 }
  +                         }
                   }
               }
   
  
  
  

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

Reply via email to