httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@leland.Stanford.EDU>
Subject Re: ap_setup_client_block() perversity
Date Mon, 29 Jun 1998 18:56:47 GMT
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).

-- Alexei Kosut <> <>
   Stanford University, Class of 2001 * Apache <> *

View raw message