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

Valery Kholodkov valery+nginxen at
Wed Jul 1 19:52:29 MSD 2009

Could you please show the code where you install the handler?

----- sayeo87 <nginx-forum at> wrote:
> Thanks guys for your replies. I have previously looked at how NGX_AGAIN is handled in the nginx source, and its along the lines of if ngx_http_read_client_request_body returns anything other than NGX_OK, return that from the module, otherwise return NGX_DONE. The problem is when I do this, my module is never called again.
> @Mike: I have tried what you described and it it promising in the sense that it appears that my handler function (2nd arg to ngx_http_read_client_request_body()) gets called again, but the handler function never returns to the main-line code of the module. Is this supposed to be expected behavior?
> I'm just confused because the way this is handled in the Nginx source does not seem to work, even though some people such as as have had success with it.
Valery Kholodkov

More information about the nginx mailing list