On 02/27/2006 08:58 PM, Justin Erenkrantz wrote:
> 
>>There are also still problems with proxy code corrupting data from the AJP
>>
>>>side of things.  See:
>>>
>>>https://issues.apache.org/jira/browse/INFRA-697
>>>
>>>for the infrastructure issue open for this.  We were at 2.2.0 but the
>>
>>proxy
>>
>>>code is just not working right.  We confirmed network traces that Tomcat
>>
>>is
>>
>>>sending the right bits back, but httpd is corrupting data near the end
>>
>>of
>>
>>>the AJP send_body_chunk responses such that the client sees junk.

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.

Thoughts on this? Did I see something wrong?

Which Tomcat version are we actually running on Ajax? Maybe I could have a look 
into
the AJP connector code on Tomcat side.

BTW: Justins idea to exchange the transient buckets with heap buckets was also 
correct
as it seems that the transient buckets might get overwritten in some situations.
So Justin could you please commit this to the trunk?


Regards

RĂ¼diger


Reply via email to