Help! log phase is not executed due to r->count being non-zero

wangweixun nginx-forum at nginx.us
Mon Oct 13 16:41:04 UTC 2014


Maxim,

You are right. Since I need to make a hash of the original request's body, I
do make call to ngx_http_read_client_request_body().

What's the best way to decrement the count then? Simply "r->count--;" before
returning from the module.

By the way, in my access phase module, I need to send an subrequest and wait
for its response asynchornously. ngx_http_read_client_request_body() also
works asynchornously with a callback function, which apparently is not able
to send a subrequest. What I did is registering two handlers in access
phase. The first one does nothing but reading the request body only. The
second one does the real work (subrequest, etc.). Does it sound right?

Thanks!!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,253906,253941#msg-253941



More information about the nginx mailing list