Welcome! Log In Create A New Profile

Advanced

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

October 13, 2014 12:41PM
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!!
Subject Author Posted

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

wangweixun October 11, 2014 12:28AM

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

wangweixun October 11, 2014 12:30AM

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

Maxim Dounin October 13, 2014 06:06AM

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

wangweixun October 13, 2014 12:41PM

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

Maxim Dounin October 13, 2014 01:08PM

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

wangweixun October 13, 2014 02:43PM

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

Maxim Dounin October 13, 2014 03:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready