How to handle NGX_AGAIN returned by ngx_http_read_client_request_body() within handler module?

Mike Smith mike at mdms.org
Tue Jun 30 03:42:12 MSD 2009


To me, it looks like you just return NGX_DONE and wait to be called
again when more data is available.

> On Mon, Jun 29, 2009 at 06:33:27PM -0400, sayeo87 wrote:
>
>> I am trying to develop a handler module in Nginx 0.7.59 to intercept POST requests and perform internal redirections based on the values in the POST data. The problem is, on larger POST requests (~ > 2KB), ngx_http_read_client_request_body() sometimes returns NGX_AGAIN instead of NGX_OK. I have read at various places that if one receives any other status than NGX_OK that that the module should immediately return that status. I have also read that after getting and returning NGX_AGAIN, NGINX will call your module again after other pending network activity. However, I have tried doing this but my module never gets called again.
>





More information about the nginx mailing list