Support for POST client body sent with Transfer-Encoding: chunked

Carlos carloscm at
Fri Feb 15 21:54:57 MSK 2008

Hello Tho,

Unfortunately I didn't find a work around. I just went and set up a
dedicated Apache in a high port to serve the mobile clients (a
solution that has its own problems since it is common for mobile
carriers to block non-standard ports.)

If you are dealing with a desktop client app you may have some control
over its configuration. The problem comes mainly from HTTP 1.1 clients
assuming the server has full support for HTTP 1.1 features, like
chunked POST bodies. Try to force HTTP 1.0 in the client, that should
disable chunked POST.

I actually spent some time with the source of nginx. I was impressed
with the extremely optimized approach to everything, from I/O to
buffering to even string comparisons. It was also very tidy and
readable. Disabling the 411 error check was easy enough but the
buffering code for the POST body is written under the asumption that
its length is fully known in advance (i.e. from the Content-Length
header sent by the client.) Apparently it is legal for HTTP 1.1
clients to not send a Content-Length header and just rely on the
auto-finalizing feature of the chunked encoding (sending a 0 length
chunk.) The buffering code was not ready for this at all and would
have required extensive modifications. Having 0 experience with the
code it would take me way too long to come up with a working patch, so
I decided to just go back to Apache for the time being.

On Fri, Feb 15, 2008 at 7:17 PM, Tho Nguyen <tho.nguyen at> wrote:
> Carlos,
>  Did you find a work around for this issue?  I'm having the same issue as well I
>  believed.  We have a system that uses a browser, java client, and a CAD
>  client.  The first two can upload files fine except the last one.

More information about the nginx mailing list