axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Davis" <...@us.ibm.com>
Subject RE: cvs commit: xml-axis/java/src/org/apache/axis/utils tcpmon.ja va
Date Wed, 22 May 2002 12:38:05 GMT
Done - give it a shot.
-Dug

Tom Jordahl <tomj@macromedia.com> on 05/20/2002 08:59:02 AM

Please respond to axis-dev@xml.apache.org

To:    "'axis-dev@xml.apache.org'" <axis-dev@xml.apache.org>
cc:
Subject:    RE: cvs commit: xml-axis/java/src/org/apache/axis/utils tcpmon.
       ja   va



Hey Dug,

While you are working on tcpmon, could you put back in the changes I made
(and you backed out) to set the Host: header to the target host?  This is
important when you target hosts that are not localhost.  Apparently not
many people do this, as I can't remember anyone else but our QA guy
complaining about this. :-)

I could never reproduce the problems reported with this change.  I do know
that the content-length header does NOT include the length of the other
headers, only the body, so that wasn't the problem with my original
changes.

It's great that you fixed resend.  That feature rocks!

Thanks.
--
Tom Jordahl
Macromedia


-----Original Message-----
From: dug@apache.org [mailto:dug@apache.org]
Sent: Monday, May 20, 2002 8:19 AM
To: xml-axis-cvs@apache.org
Subject: cvs commit: xml-axis/java/src/org/apache/axis/utils tcpmon.java


dug         02/05/20 05:18:35

  Modified:    java/src/org/apache/axis/utils tcpmon.java
  Log:
  Get tcpmon working again
   - resend will now work again (not all cases yet but at least some)
   - remove some error message (exceptions) that get thrown

  Revision  Changes    Path
  1.31      +18 -24    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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- tcpmon.java 17 May 2002 19:09:34 -0000    1.30
  +++ tcpmon.java 20 May 2002 12:18:34 -0000    1.31
  @@ -443,8 +443,8 @@
                   int         reqSaved = 0 ;

                   int   thisIndent, nextIndent=0 ;
  -                inSocket.setSoTimeout(10 );
  -                outSocket.setSoTimeout(10 );
  +                if ( inSocket  != null ) inSocket.setSoTimeout( 10 );
  +                if ( outSocket != null ) outSocket.setSoTimeout( 10 );

                   for ( ;; ) {
                       if( done ) break;
  @@ -457,14 +457,11 @@
                       while( len1==0 ) {
                           try {
                               len1 = in.read(buffer,saved,len);
  -                        } catch( java.io.InterruptedIOException ex ) {
  -                            //System.out.println("Interrupted exception
  reading" + this +
  -                            //                   " " + done);
  +                        } catch( Exception ex ) {
                               len1=0;
                               if( done ) return;
                           }
                       }
  -                    // System.out.println("XXX Read result: " + this + "
                       "  +len1 + " " + out);
                       len=len1;
                       if ( len == -1 ) break ;

  @@ -572,17 +569,17 @@
           boolean      active ;
           String       fromHost ;
           String       time ;
  -        JTextArea    inputText ;
  -        JScrollPane  inputScroll ;
  -        JTextArea    outputText ;
  -        JScrollPane  outputScroll ;
  -        Socket       inSocket ;
  -        Socket       outSocket ;
  -        Thread       clientThread ;
  -        Thread       serverThread ;
  -        SocketRR     rr1 = null ;
  -        SocketRR     rr2 = null ;
  -        InputStream  inputStream ;
  +        JTextArea    inputText    = null ;
  +        JScrollPane  inputScroll  = null ;
  +        JTextArea    outputText   = null ;
  +        JScrollPane  outputScroll = null ;
  +        Socket       inSocket     = null ;
  +        Socket       outSocket    = null ;
  +        Thread       clientThread = null ;
  +        Thread       serverThread = null ;
  +        SocketRR     rr1          = null ;
  +        SocketRR     rr2          = null ;
  +        InputStream  inputStream  = null ;

           String       HTTPProxyHost = null ;
           int          HTTPProxyPort = 80 ;
  @@ -620,13 +617,10 @@
                       else HTTPProxyPort = Integer.parseInt( tmp );
                   }

  -                if ( inSocket != null ) {
  -                  InetAddress  h  = inSocket.getInetAddress();
  -                  fromHost      = h.getHostName();
  -                }
  -                else {
  +                if ( inSocket != null )
  +                  fromHost = (inSocket.getInetAddress()).getHostName();
  +                else
                     fromHost = "resend" ;
  -                }

                   DateFormat   df = new SimpleDateFormat("MM/dd/yy hh:mm:
                   ss aa");
                   time = df.format( new Date() );
  @@ -678,7 +672,7 @@

                   int index = listener.connections.indexOf( this );

  -                if ( listener.isProxyBox.isSelected() || HTTPProxyHost !
  = null ) {
  +                if (listener.isProxyBox.isSelected() || HTTPProxyHost !=
  null) {
                       // Check if we're a proxy
                       byte[]       b = new byte[1];
                       buf = new StringBuffer();




Mime
View raw message