Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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;
        } } }
share|improve this question
    
Probably a dupe serverfault.com/questions/159313/… –  Danack May 12 '13 at 16:03
4  
No, this is not a dupe. This question deals with chunked requests while the other deals with chunked responses. –  Michael Hampton May 12 '13 at 22:00
1  
Ah not a dupe at all. According to this ruby-forum.com/topic/4408411 no configuration is required 'There are no special directives at all. It just works.'. If it's not working from a tablet, how about testing with CURL 'curl -v -X POST --header "Transfer-Encoding: chunked" -d @Test.txt "localhost:8080/"'; ? –  Danack May 13 '13 at 22:17

1 Answer 1

(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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.