Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
October 13, 2014 03:10PM
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 is used by the next handler.
> Everything seems to be working fine to me.

If you don't need a request body in your module, it's not clear
why at all you are trying to read it. If, in contrast, you do
need the request body, you shouldn't try to do the real work till
the post_handler is called.

Technically, you can use multiple access-phase handlers to handle
things, as long as proper order is maintained by using flags set
in post_handler. But there is no need to use multiple handlers to
do this, as there is no real difference as long as you anyway
maintain flags set in post_handler. On the other hand, if you
indeed using a stub post_handler, it means that things are working
by chance.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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: 309
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