httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: [users@httpd] Apache 2.0.54 creating "Bad request" on POST over 8kb
Date Wed, 21 Sep 2005 17:48:35 GMT
On Wednesday 21 September 2005 17:15, Joshua Slive wrote:

> On 9/21/05, Tuomas J Rinta <> wrote:

> > This was because my app wasn't sending a Content-Length-header and my
> > browser was. Apparently Apache can't handle the POST request if it is
> > ~8kb or over AND it doesn't have the Content-Length-header set.

8Kb is the default buffer size apache users, so if something is going
to break, that's a likely point for it to happen.

> I'm not a protocol expert, but what surprises me here is that apache
> is accepting any POST at all without a content length.  See RFC2616
> section 4.4.  POSTs must contain either a content-length, or (if the
> client is sure the server is HTTP/1.1) a transfer-encoding: chunked.
> This is a basic restriction of the protocol and can't be avoided.

Yes, but there's no suggestion that the failed requests don't have
chunked encoding, is there?  Apache can accept chunked requests,
but maybe the application refuses them.  So we have two possibilities:

* the requests are broken (possibly by a proxy) when they reach Apache.
* the application that's processing them on Apache is broken.

The OP should find out whether the requests in question are indeed chunked.

> A proxy that strips content length and doesn't convert the body to
> chunked encoding is very broken and probably won't work with any
> server.  (Even if it does convert to chunked encoding, it is still
> likely to run into problems.)

Yep.  And it's frighteningly easy to set up an Apache proxy that
breaks like that, if it's running an input filter that affects the
request body.  Though probably not in 2.0.54.

Nick Kew

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message