httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: cvs commit: apache-2.0/src/main http_protocol.c
Date Tue, 14 Nov 2000 06:45:56 GMT
On Mon, 13 Nov 2000 wrote:

> > That can't be right.  0 is a valid content-length that means no body.
> > See ap_send_http_options() for an example.
> > 
> > A zero content-length is necessary for such a response to maintain a
> > persistent connection -- removing it implies that the body ends when
> > the connection closes. 
> > 
> > This has nothing to do with HEAD responses.  It may be that some other
> > addition within the filter code is generating a zero-length field
> > incorrectly, but removing the side-effect is not a solution.  -1.
> > Fix the place that is generating the incorrect Content-Length.
> Okay, I read the spec, and thought that we were okay in not sending
> 0-length C-L's.  I was wrong.  I'll back this out ASAP.  I may have fixed
> the actual problem in some of my later commits.

Roy,  I know what is happening, and I am 99% sure it is wrong, but I want
you to double check me.  Basically, if we make a HEAD request and we don't
send any data down the filter, then we get a 0 C-L.  The reason is simple,
the C-L filter sees that we have an EOS at the end of the brigade, and it
figures it can compute the content-length, so it sets it to 0.

Unfortunately, the Spec seems to say that a C-L on a HEAD response must be
the length of the actual data.  This problem is solved if the handlers
stop trying to deal with HEAD requests, but that also slows us down when
we try to serve HEAD requests.  

I don't have a great answer for the problem yet, but am  I correct in how
I read the Spec?


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message