Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: TCPMon
    • Labels:
      None
    • Environment:
      WIN2KSP4 JDK1.5.0_06

      Description

      I am using tcpmonitor as a valuable tool.
      But when i try to resend an already successful sent message i observe that in the send pane the Content-Length changes to zero and in the receive pane i get an error message
      java.lang.IllegalArgumentException: message is empty
      Additionally on the first send nothing appears on the console whrereas on the resend both outgoing messages show now one with
      Content-Length: 586
      and one with
      Content-Length: 0
      I face this problem both with release 1.3 and with latest self-built SVN.
      I sit behind proxy and firewall if that matters and the call is
      D:\projekte\Pegasus>java -cp "D:\Quellen\SVN\axis\c\obj\classes\wsdl2ws.jar;D:\Quellen\SVN\axis\c\obj\classes\buildtools
      .jar;D:\Quellen\SVN\axis\java\build\lib\axis.jar;D:\Quellen\SVN\axis\java\build\lib\axis-ant.jar;D:\Quellen\SVN\axis\jav
      a\build\lib\commons-discovery-0.2.jar;D:\Quellen\SVN\axis\java\build\lib\commons-logging-1.0.4.jar;D:\Quellen\SVN\axis\j
      ava\build\lib\jaxrpc.jar;D:\Quellen\SVN\axis\java\build\lib\saaj.jar;D:\Quellen\SVN\axis\java\build\lib\wsdl4j-1.5.1.jar
      ;.;C:\Programme\Saxon\saxon8.jar;C:\Programme\Tomcat 5.5\common\lib\servlet-api.jar;C:\Programme\Tomcat 5.5\common\lib\j
      sp-api.jar;C:\Programme\Tomcat 5.5\common\lib\activation.jar;C:\Programme\Tomcat 5.5\common\lib\mail.jar;C:\Programme\To
      mcat 5.5\common\lib\xmlsec.jar;C:\Programme\logging-log4j-1.2.12\dist\lib\log4j-1.2.12.jar;C:\Programme\junit3.8.1\junit
      .jar" -Dhttp.proxyHost=proxy -Dhttp.proxyPort=81 org.apache.axis.utils.tcpmon 80 scftest.pegstour.com 80

        Issue Links

          Activity

          Franz Fehringer created issue -
          Hide
          Franz Fehringer added a comment -

          It seems that tcpmon recalculates the Content-Length on resend (perhaps the user has altered the send buffer) and due to some typo/braino calculates it always as zero.

          Show
          Franz Fehringer added a comment - It seems that tcpmon recalculates the Content-Length on resend (perhaps the user has altered the send buffer) and due to some typo/braino calculates it always as zero.
          Hide
          Franz Fehringer added a comment -

          I have found the source of the problem.
          The recalculated Content-Length is the length of the whole send buffer minus the length of the first line (the one beginning with POST or GET).
          In the length calculation for the first line the character(s) of the line ending is/are included.
          The problem now is that the current Java code in src/org/apache/axis/utils/tcpmon.java assumes that two line separators end the POST/GET line i.e. that there is an empty line before the real content.
          But this is not true, only one is present (at least in my environment, see above).
          Therefore tcpmon seeks to the end of the send buffer instead to the end of the first line.
          For me the following change to tcpmon.java is the cure (diff -b -B tcpmon.java tcpmon.java.orig):

          1770c1770
          < pos3 = text.indexOf( "\n" );

          > pos3 = text.indexOf( "\n\n" );
          1772c1772
          < pos3 = text.indexOf( "\r\n" );

          > pos3 = text.indexOf( "\r\n\r\n" );
          1774c1774
          < pos3 = pos3 + 2 ;

          > pos3 = pos3 + 4 ;
          1778c1778
          < pos3 += 1 ;

          > pos3 += 2 ;

          Show
          Franz Fehringer added a comment - I have found the source of the problem. The recalculated Content-Length is the length of the whole send buffer minus the length of the first line (the one beginning with POST or GET). In the length calculation for the first line the character(s) of the line ending is/are included. The problem now is that the current Java code in src/org/apache/axis/utils/tcpmon.java assumes that two line separators end the POST/GET line i.e. that there is an empty line before the real content. But this is not true, only one is present (at least in my environment, see above). Therefore tcpmon seeks to the end of the send buffer instead to the end of the first line. For me the following change to tcpmon.java is the cure (diff -b -B tcpmon.java tcpmon.java.orig): 1770c1770 < pos3 = text.indexOf( "\n" ); — > pos3 = text.indexOf( "\n\n" ); 1772c1772 < pos3 = text.indexOf( "\r\n" ); — > pos3 = text.indexOf( "\r\n\r\n" ); 1774c1774 < pos3 = pos3 + 2 ; — > pos3 = pos3 + 4 ; 1778c1778 < pos3 += 1 ; — > pos3 += 2 ;
          Davanum Srinivas made changes -
          Field Original Value New Value
          Component/s Basic Architecture [ 10811 ]
          Key AXIS-2373 WSCOMMONS-158
          Project Apache Axis [ 10460 ] WS-Commons [ 12310250 ]
          Affects Version/s current (nightly) [ 10463 ]
          Component/s TCPMon [ 12311340 ]
          Andreas Veithen made changes -
          Link This issue duplicates WSCOMMONS-5 [ WSCOMMONS-5 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Franz Fehringer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development