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

CarlWang nginx-forum at
Mon Nov 7 16:36:10 UTC 2011

I have a similar problem here.
My handler module in Nginx is supposed to intercept POST requests,
analyse it and send response( the response body maybe larger than 64k).
Of course, I used ngx_http_read_client_request_body to register my
The request_body_handler does some computing and calls
ngx_http_output_filter(r,out) to send the response.
Here is the problem. If this response is less than 64k, it works fine.
But if this response is larger than 64k, the ngx_http_output_filter will
return NGX_AGAIN. However, since it's in the request_body_handler
function and it has nothing to return. I can't figure out how to handle

Can anyone help me out? Thanks a lot.

Posted at Nginx Forum:,3545,217932#msg-217932

More information about the nginx mailing list