You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Kaushal Jha - ZEDO <ka...@zedo.com> on 2005/08/19 10:10:23 UTC
extra characters in between response headers and response body of apache 1.3 but not in apache2.0
hey guys,
I observed that only apache 1.3 (1.3.33) sends out the extra characters as shown below
apache2.0 does not send out those characters,
could this be due to some code in apache1.3 ?
---------------------------------------------------------------------------------------------------------
...
....
...
Keep-Alive: timeout=10, max=499
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
165 < -------------------- what's this doing here ?
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
The document has moved <A HREF="http://www.kaushaljha.com/>here</A>.<P>
<HR>
<ADDRESS>ZEDO 3G Server at devjuhu1.juhu.zedo.com Port 80</ADDRESS>
</BODY></HTML>
0 < -------------------- what's this doing here ?
---------------------------------------------------------------------------------------------------------
thanks in advance ..
Re: extra characters in between response headers and response body of apache 1.3 but not in apache2.0
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Sun, Aug 21, 2005 at 01:54:01PM -0500, William A. Rowe, Jr. wrote:
> At 09:30 AM 8/19/2005, Jeff Trawick wrote:
> >On 8/19/05, Kaushal Jha - ZEDO <ka...@zedo.com> wrote:
> >>
> >> hey guys,
> >> I observed that only apache 1.3 (1.3.33) sends out the
> >> extra characters as shown below
> >> apache2.0 does not send out those characters,
> >
> >go read up on "Transfer-Encoding: chunked"; those funny little
> >characters tell the client in hex the size of the next chunk of data;
> >the "0" size says we're done
>
> Yes; this is a BUG in 2.0 (and folks say that CHUNKED_PASS
> semantics are wrong...)
As far as I can tell, the example was from a chunked response - not a
chunked request.
Therefore, I don't know why you say there's evidently a bug in 2.x.
> Any CGI author who parses Transfer-Encoding:chunked and knows
> how to deal with it expects the chunk headers; apache 1.3 does
> this correctly.
Not true. CGIs can't handle chunked request bodies in 1.3 (mod_cgi uses
REQUEST_CHUNKED_ERROR). So, 1.3 would always reject such bodies well
before any script could execute.
> Apache 2.0 needs to do so as well, but transparently, because
> filters in between know damned well that Apache has dechunked
> the data. I'm thinking of something as simple as a 'sentinal'
> bucket type to mark a new chunk, who's size would be recomputed
> and formatted when that brigade is written, lest another filter
> has added or removed bytes in the chunk.
You could stick in a metadata bucket - but I don't see how that could
get passed to a CGI program. -- justin
Re: extra characters in between response headers and response
body of apache 1.3 but not in apache2.0
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 09:30 AM 8/19/2005, Jeff Trawick wrote:
>On 8/19/05, Kaushal Jha - ZEDO <ka...@zedo.com> wrote:
>>
>> hey guys,
>> I observed that only apache 1.3 (1.3.33) sends out the
>> extra characters as shown below
>> apache2.0 does not send out those characters,
>
>go read up on "Transfer-Encoding: chunked"; those funny little
>characters tell the client in hex the size of the next chunk of data;
>the "0" size says we're done
Yes; this is a BUG in 2.0 (and folks say that CHUNKED_PASS
semantics are wrong...)
Any CGI author who parses Transfer-Encoding:chunked and knows
how to deal with it expects the chunk headers; apache 1.3 does
this correctly.
Apache 2.0 needs to do so as well, but transparently, because
filters in between know damned well that Apache has dechunked
the data. I'm thinking of something as simple as a 'sentinal'
bucket type to mark a new chunk, who's size would be recomputed
and formatted when that brigade is written, lest another filter
has added or removed bytes in the chunk.
Bill
Re: extra characters in between response headers and response body of apache 1.3 but not in apache2.0
Posted by Jeff Trawick <tr...@gmail.com>.
On 8/19/05, Kaushal Jha - ZEDO <ka...@zedo.com> wrote:
>
> hey guys,
> I observed that only apache 1.3 (1.3.33) sends out the
> extra characters as shown below
> apache2.0 does not send out those characters,
go read up on "Transfer-Encoding: chunked"; those funny little
characters tell the client in hex the size of the next chunk of data;
the "0" size says we're done