Hello!
On Sun, Nov 25, 2012 at 5:29 AM, Tal Weiss wrote:
> Thank you for your work on the Nginx chunking module.
The ngx_chunkin module will soon be obsolete once the next Nginx
development release includes all the patches from Maxim Dounin that
add built-in chunked request body support into the Nginx core:
http://mailman.nginx.org/pipermail/nginx-devel/2012-November/002961.html
I'm happy that I no longer need to maintain ngx_chunkin :)
> We are trying to get it to work in this configuration:
> Nginx + Gunicorn + Django.
>
> It works, BUT Django only sees the chunked HTTP Post when the entire message
> is received.
> Is Nginx buffering the entire message and only then pushing it forward?
Yes, almost always, including the new patches adding the built-in
support for chunked request bodies to the Nginx core.
A notable exception is when you use the ngx.req.socket() API provided
by ngx_lua:
http://wiki.nginx.org/HttpLuaModule#ngx.req.socket
But ngx.req.socket does not support chunked encoding yet. I'll
implement that once Maxim Dounin's patches get their way into the next
development release of Nginx.
> Or should I look elsewhere (Gunicorn?) for the culprit?
I don't think it will help here.
BTW non-buffered forwarding on the Nginx level is not a good idea if
your Python apps do not use 100% nonblocking I/O because that way your
Python apps are vulnerable to slow client attacks.
> Or is this a configuration option?
>
No.
BTW, I'm cc'ing the openresty-en mailing list:
https://groups.google.com/group/openresty-en so other users can see
our discussion here as well :)
Best regards,
-agentzh