httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: ap_setup_client_block() perversity
Date Tue, 30 Jun 1998 00:05:00 GMT
This would be a good comment to add to the source...

Dean

On Mon, 29 Jun 1998, Ben Laurie wrote:

> Alexei Kosut wrote:
> > 
> > On Mon, 29 Jun 1998, Ben Laurie wrote:
> > 
> > > If read_policy is REQUEST_CHUNKED_ERROR, and the Transfer-Encoding is
> > > "chunked" and there is no Content-Length, then HTTP_LENGTH_REQUIRED is
> > > returned. However, if there is a Content-Length, then HTTP_BAD_REQUEST
> > > is returned. This seems odd to me, but perhaps there is a rational
> > > explanation. Any offers?
> > 
> > Section 4.4 of RFC 2068:
> > 
> > "Messages MUST NOT include both a Content-Length header field and the
> > "chunked" transfer coding."
> > 
> > So it is a bad request... (although the next sentence does say "If both
> > are received, the Content-Length MUST be ignored. Which, unfortunately, we
> > can't do, because the length isn't guaranteed to be the same as the actual
> > entity length, which is defined by the chunking instead, but which we'd
> > have to strip out to give to the CGI, but can't. So given that a 411 only
> > requests the addition of a Content-Length, and not specifically the
> > removing of any transfer-coding (though it's implied), and we can't
> > properly parse the request, a 400 error reponse is as good as any other.
> > Better, in fact).
> 
> Ah, I get it. You mean if we get T-E and no C-L, we say "give me a C-L
> (instead of a T-E)". If we get both, we say "sod off". (only in the case
> where someone wants to say REQUEST_CHUNKED_ERROR, of course, which leads
> me on to, err, why would anyone do that?). Thankyou.
> 
> Cheers,
> 
> Ben.
> 
> -- 
> Ben Laurie            |Phone: +44 (181) 735 0686| Apache Group member
> Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org/
> and Technical Director|Email: ben@algroup.co.uk |
> A.L. Digital Ltd,     |Apache-SSL author     http://www.apache-ssl.org/
> London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache/
> 
> WE'RE RECRUITING! http://www.aldigital.co.uk/recruit/
> 


Mime
View raw message