Welcome! Log In Create A New Profile

Advanced

Re: ngx_http_get_module_loc_conf() and r->internal weirdness

Maxim Dounin
January 07, 2010 12:44PM
Hello!

On Thu, Jan 07, 2010 at 02:01:08PM +0100, Srebrenko Šehić wrote:

> On Thu, Jan 7, 2010 at 1:23 PM, Maxim Dounin <mdounin@mdounin.ru> wrote:
> > Hello!
> >
> > On Thu, Jan 07, 2010 at 07:19:55AM +0100, Srebrenko Šehić wrote:
> >
> >> On Tue, Dec 29, 2009 at 11:03 PM, Srebrenko Šehić <ssehic@gmail.com> wrote:
> >> > Hi list,
> >> >
> >> > While working on extending nginx' Perl support, I stumbled upon the
> >> > following behavior.
> >> >
> >> > If an input handler issues a internal redirect via
> >> > ngx_http_internal_redirect(), a call to
> >> > ngx_http_get_module_loc_conf(r, ngx_http_X_module) inside an
> >> > NGX_HTTP_LOG_PHASE handler returns NULL. If the request is not an
> >> > internal redirect, the call returns the expected location config.
> >> >
> >> > Any idea why?
> >>
> >> I've still found a solution for this. Anyone with a clue?
>
> Hi,
>
> > You are doing something wrong.  As you may see in log module - it
> > uses ngx_http_get_module_loc_conf() happily and works ok with
> > internal redirects.  Internal redirects clear module contexts, but
> > not configs.
>
> Yes. I did have a look. However, the difference is that my module
> issues an internal redirect in it's own input handler. When the
> registered LOG_PHASE handler runs in the same module - the local
> config is gone.

Try producing minimal code that triggers the problem and post it
for review. As long as we don't know what you did - we can't find
out what's wrong.

Maxim Dounin

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

ngx_http_get_module_loc_conf() and r->internal weirdness

Srebrenko Šehić 3049 December 29, 2009 05:04PM

Re: ngx_http_get_module_loc_conf() and r->internal weirdness

Srebrenko Šehić 1206 January 07, 2010 01:22AM

Re: ngx_http_get_module_loc_conf() and r->internal weirdness

Maxim Dounin 1137 January 07, 2010 07:24AM

Re: ngx_http_get_module_loc_conf() and r->internal weirdness

Srebrenko Šehić 1187 January 07, 2010 08:02AM

Re: ngx_http_get_module_loc_conf() and r->internal weirdness

Maxim Dounin 1974 January 07, 2010 12:44PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 279
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