tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 20184] New: - JkInputStream ignores packets containing less than 5 bytes
Date Fri, 23 May 2003 13:40:41 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20184>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20184

JkInputStream ignores packets containing less than 5 bytes

           Summary: JkInputStream ignores packets containing less than 5
                    bytes
           Product: Tomcat 4
           Version: 4.1.24
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Connector:Coyote JK 2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: dgoeury@workspeed.com


JkInputStream.receive() thinks that MsgAjp.getLen() returns the total number 
of bytes contained by the ajp13 packet when in fact it returns only the data 
length. Here is where I think the bug comes from:

  /** Receive a chunk of data. Called to implement the
   *  'special' packet in ajp13 and to receive the data
   *  after we send a GET_BODY packet
   */
  public boolean receive() throws IOException
  {
    ...
    if( bodyMsg.getLen() <= 4 ) { // just the header
      // Don't mark 'end of stream' for the first chunk.
      // end_of_stream = true;
      return false;
    }
    ...
  }

And here is an example of a packet that is ignored because of this bug. This 
packet contains a two characters string "ab".

  Byte   Content    Description

   0      0x12    standard header
   1      0x34    standard header
   2      0x00    data length
   3      0x04    data length
   4      0x00    string length
   5      0x02    string length
   6      0x61    'a'
   7      0x62    'b'

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message