There exists a internet based application being produced built using django. It's used on nginx proxied with apache which handles the django application via WSGI. OS is Ubuntu.

Additionally to the net based front-finish, we lately created a J2ME client for uploading files via cell phone. The J2ME transfers the file with Transfer-Encoding set as "Chunked" and content length set to zero that's the conventional method for the J2ME framework and apparently it can't be transformed.

However , neither nginx, nor apache allow zero content length chunked data and provide back HTTP 411 error response. django also appears problematic but it may be patched easily.

Couple of solutions on internet suggest recompiling nginx and apache but I'd rather not get into that. Could there be considered a easier solution?

In my opinion, J2ME switches to chunked encoding if you are using OutputStream.flush(). Avoid flush, just email the OutputStream then close it immediately. I could submit a Publish for an Apache/Django setup with J2ME all right. I had been getting 411 errors due to using flush(). After I took it off it labored fine. I didn't set Content-Length by hand, it had been instantly set.