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

2014-10-13 Thread Maxim Dounin
Hello! On Mon, Oct 13, 2014 at 02:43:07PM -0400, wangweixun wrote: > Thanks for your prompt reply. > > Why do I have to do the work in the post handler? Now I have a stub post > handler. ngx_http_read_client_request_body() does nothing but load the > request body into the original request, which

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

2014-10-13 Thread wangweixun
Thanks for your prompt reply. Why do I have to do the work in the post handler? Now I have a stub post handler. ngx_http_read_client_request_body() does nothing but load the request body into the original request, which is used by the next handler. Everything seems to be working fine to me. I'm n

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

2014-10-13 Thread Maxim Dounin
Hello! On Mon, Oct 13, 2014 at 12:41:04PM -0400, wangweixun wrote: > 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 >

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

2014-10-13 Thread wangweixun
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 a

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

2014-10-13 Thread Maxim Dounin
Hello! On Sat, Oct 11, 2014 at 12:28:08AM -0400, wangweixun wrote: > Hey all, > > I'm writing an authentication module that is structurally very similar to > ngx_http_auth_request_module > (https://github.com/PiotrSikora/ngx_http_auth_request_module/blob/master/ngx_http_auth_request_module.c). >

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

2014-10-10 Thread wangweixun
BTW, I can add "r->count--;" in my module and it seems to work. But I don't feel it is the right thing especially when I'm not sure how it works. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,253906,253907#msg-253907 ___ nginx mailing list n

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

2014-10-10 Thread wangweixun
Hey all, I'm writing an authentication module that is structurally very similar to ngx_http_auth_request_module (https://github.com/PiotrSikora/ngx_http_auth_request_module/blob/master/ngx_http_auth_request_module.c). It basically sends a subrequest to a service for auth. For testing, I put a hell