I've looked into this a bit more and it appears we have a chunking bug in Apache 2.0.
Specifically, Apache 2.0 is not terminating the first chunk with a CRLF as it should.

I send the server this request:
GET /test.jsp  HTTP/1.1
HOST: 127.0.0.1

and here is what I get back...

********** Apache 2.0  (IE chokes on this response) **********
HTTP/1.1 200 OK\r\n
Date: Tue, 26 Jun 2001 12:15:55 GMT\r\n
Server: Apache/2.0.19-dev (Win32) DAV/2\r\n
Set-Cookie: JSESSIONID=0000U2XZ0EANV22F11VVW2OEL5Y:-1;Path=/\r\n
Cache-Control: no-cache="set-cookie,set-cookie2"\r\n
Expires: Thu, 01 Dec 1994 16:00:00 GMT\r\n
Transfer-Encoding: chunked\r\n
Content-Type: text/html;charset=Cp1252\r\n
Content-Language: en\r\n
\r\n
79\r\n
<html> \r\n
\r\n
<head> \r\n
   <title>Really Simple</title> \r\n
</head> \r\n
<body> \r\n
<h1>Hello from Rhino\r\n
</h1>\r\n
</body> \r\n
</html>\r\n
0\r\n
\r\n

********** 1.3.20 (IE displays this properly) *********
HTTP/1.1 200 OK\r\n
Date: Tue, 26 Jun 2001 12:12:10 GMT\r\n
Server: Apache/1.3.20 (Win32)\r\n
Set-Cookie: JSESSIONID=0000KX2HYWEKBAP42NTADCLWURQ:-1;Path=/\r\n
Cache-Control: no-cache="set-cookie,set-cookie2"\r\n
Expires: Thu, 01 Dec 1994 16:00:00 GMT\r\n
Transfer-Encoding: chunked\r\n
Content-Type: text/html;charset=Cp1252\r\n
Content-Language: en\r\n
\r\n
79 \r\n
<html> \r\n
\r\n
<head> \r\n
   <title>Really Simple</title> \r\n
</head> \r\n
<body> \r\n
<h1>Hello from Rhino\r\n
</h1>\r\n
</body> \r\n
</html>\r\n
\r\n
0\r\n
\r\n

Bill

----- Original Message -----
From: "Bill Stoddard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 25, 2001 12:13 PM
Subject: Nasty chunking bug (in MSIE?) when using ap_rwrite()/ap_rflush()


> I have a module that calls ap_rwrite() followed by ap_rflush().  Content length is 
>not
> provided so Apache 2.0 chunks the response.
>
> Here is what happens...
> I call ap_rwrite() to write a x75 len byte stream.  All the correct headers are 
>built,
and
> the content is buffered by the OLD_WRITE filter. Then I call ap_rflush() which causes
the
> headers to be sent on the wire along with the first chunk (x75 length). My handler is
done
> at this point and returns control to Apache.  The next thing Apache sends on the 
>wire is
> the 0 byte chunk header to indicate that the response is done.
>
> The problem: IE chokes when it receives just the 0 byte chunk header in a packet.
>
> Thoughts?
>
> Bill
>

Reply via email to