[dev] add support for chunked input encoding in nginx

Manlio Perillo manlio.perillo at gmail.com
Tue Apr 1 17:14:10 MSD 2008


How hard is to add support for chunked input encoding in Nginx?
I'm not talking about generic support, but only support for a very 
specialized module I'm planning to write.

Reading the sources I see this:

if (r->method & (NGX_HTTP_POST|NGX_HTTP_PUT)
     && r->headers_in.content_length_n == -1)
     ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
               "client sent POST method without \"Content-Length\" header");
     ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED);
     return NGX_ERROR;

This code can be relaxed, but is it safe?

Thanks  Manlio Perillo

More information about the nginx mailing list