Installing handlers in NGX_HTTP_LOG_PHASE
ssehic at gmail.com
Wed Dec 23 15:55:21 MSK 2009
On Wed, Dec 23, 2009 at 11:42 AM, Piotr Sikora <piotr.sikora at frickle.com> wrote:
> ngx_http_perl_handler_init should stay in postconfiguration init phase. What
> you should do to use this feature conditionally is to use yourcf->enable
> flag (for working example check ngx_http_autoindex_module.c).
> This is because you don't set new handler but you are adding new one to the
> processing chain and your handler will be called for every single request
> (so you must return NGX_DECLINE as soon as possible when it isn't enabled).
Thanks Piotr. I'll implement it as suggested by you and Maxim.
More information about the nginx-devel