dug         02/03/26 04:26:31

  Modified:    java/src/org/apache/axis/utils tcpmon.java
  Log:
  Back out last change to tcpmon - with this change the first
  line of the request (ie. GET/POST) isn't displayed anymore.
  Tom - if you want to retry this change go ahead but please
  verify that it doesn't break anything.
  
  Revision  Changes    Path
  1.29      +3 -43     xml-axis/java/src/org/apache/axis/utils/tcpmon.java
  
  Index: tcpmon.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/tcpmon.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- tcpmon.java       18 Mar 2002 22:06:28 -0000      1.28
  +++ tcpmon.java       26 Mar 2002 12:26:31 -0000      1.29
  @@ -464,7 +464,7 @@
                               if( done ) return;
                           }
                       }
  -                    //System.out.println("XXX Read result: " + this + " "  +len1 + 
" " + out);
  +                    // System.out.println("XXX Read result: " + this + " "  +len1 + 
" " + out);
                       len=len1;
                       if ( len == -1 ) break ;
   
  @@ -678,9 +678,9 @@
   
                   int index = listener.connections.indexOf( this );
   
  -                //
  -                // Check if we're a proxy
                   if ( listener.isProxyBox.isSelected() || HTTPProxyHost != null ) {
  +                    // Check if we're a proxy
  +                    int          ch ;
                       byte[]       b = new byte[1];
                       buf = new StringBuffer();
                       String       s ;
  @@ -736,46 +736,6 @@
                           }
   
                       }
  -                } else {
  -                    //
  -                    // Change Host: header to point to correct host
  -                    //
  -                    byte[] b1 = new byte[1];
  -                    buf = new StringBuffer();
  -                    String s1;
  -                    
  -                    for ( ;; ) {
  -                        int len ;
  -                        len = tmpIn1.read(b1, 0, 1);
  -                        if ( len == -1 ) 
  -                                break ;
  -                        s1 = new String( b1 );
  -                        buf.append( s1 );
  -                        if ( b1[0] != '\n' ) 
  -                                continue ;
  -                        // we have a complete line
  -                        String line = buf.toString();
  -                        buf.setLength(0);
  -                        // check to see if we have found Host: header
  -                        if (line.startsWith("Host: ")) {
  -                            // we need to update the hostname to be the target host
  -                            String newHost = "Host: " + targetHost + "\r\n";
  -                            bufferedData = bufferedData.concat(newHost);
  -                            break ;
  -                        } 
  -                        // add it to our headers so far
  -                        if (bufferedData == null)
  -                            bufferedData = line;
  -                        else
  -                            bufferedData = bufferedData.concat(line);
  -                    
  -                        // failsafe
  -                        if (line.equals("\r\n"))
  -                            break;
  -                    }
  -
  -                    if (bufferedData != null)
  -                        inputText.append( bufferedData );
                   }
   
                   if ( targetPort == -1 ) targetPort = 80 ;
  
  
  


Reply via email to