Nginx – Enabling Chunked Transfer encoding in Nginx v.1.3.9+

nginx

Apparently Nginx now supports Chunked, but I receive error "411 Length Required" when a tablet device sends a Chunked request to Nginx. Any advice as to how to configure Nginx to support Chunked?
I'm using v.1.3.9.

I know a similar question was asked, but it was in 2010 before chunked was supported in Nginx.

My nginx.conf:

master_process off;
worker_processes  1;
daemon off;

pid        /usr/nginx/logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    ngao_filters_directory /usr/nginx/filters;

    include       mime.types;
    default_type  application/octet-stream;

    # prevent caching by client
    add_header    Cache-Control "no-store, no-cache";

    sendfile        on;
    keepalive_timeout  65; 

  server {
        listen       8081;
        server_name  localhost;
    client_max_body_size 3m;
    chunked_transfer_encoding on;

    scgi_temp_path  /usr/nginx/scgi_temp;
    uwsgi_temp_path /usr/nginx/uwsgi_temp;

        location / {
        proxy_buffering off;
    proxy_pass    http://10.0.2.20:79;

        }  
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        } } }

Best Answer

(Posting a response because I cannot comment yet. Need >50 reputation)

You should read this.

The trick is to set proxy_buffering off; in your location block.

^--- I see you have already tried this.

Nginx does not currently support chunked POST requests [...]
The only working solution I found is this:
http://wiki.nginx.org/HttpChunkinModule

^--- But I think this is your best bet. It implies that you need to compile nginx, though