On 02/27/2006 10:20 PM, Ruediger Pluem wrote: > > On 02/27/2006 08:58 PM, Justin Erenkrantz wrote:
> > > Meanwhile I doubt that Tomcat sent the correct response. But maybe it is just > me, > so lets see what I found from the dump Justin sent over to me: > > The following is the start of an AJP send_body_chunk (packet 1902): > > 41 42 1f fc 03 20 00 0a > > 41 42 are the id bytes => OK > 1f fc says that the whole message has 1FCFC = 8188 bytes which is correct > as we have to > substract the 4 bytes at the start (41 42 1f fc). => OK > > 03 says send_body_chunk => OK > 20 00 is the length of the body chunk in byte 2000 = 8192 bytes => WRONG. > The length of the > body chunk is only 8188 - 3 (3 bytes for 03 20 00) = 8185 bytes long. > Keep in mind that > this length is actually used as the length of the transient buffer. > > 0a First data byte of chunk => OK > > Now the next AJP send_body_chunk in row (Packet 1902 at the end) > > 41 42 00 0c 03 20 00 20 > > 41 42 are the id bytes => OK > 00 0C says that the whole message has 000C = 12 bytes which is correct as > we have to > substract the 4 bytes at the start (41 42 1f fc). => OK > 03 says send_body_chunk => OK > 20 00 is the length of the body chunk in byte 2000 = 8192 bytes => WRONG. > The length of the > body chunk is only 12 - 3 (3 bytes for 03 20 00) = 9 bytes long. Keep > in mind that > this length is actually used as the length of the transient buffer. > > The next AJP send_body_chunk in row (Packet 1903) is similar to the first I > analysed: > > Message length 8188, chunk length 8192. > After some chat with Justin on IRC, we had a look in the code of Tomcat 5.5.15. We believe that the root cause for the problem can found in line 1265 of AjpAprProcessor.java (thats within the doWrite method). Instead of outputBuffer.putShort((short) chunk.getLength()); it should be outputBuffer.putShort((short) thisTime); Regards RĂ¼diger