nginx mogilefs module 1.0.1

Valery Kholodkov valery+nginxen at grid.net.ru
Thu Apr 16 18:45:37 MSD 2009


----- "Maxim Dounin" <mdounin at mdounin.ru> wrote:

> Hello!
> 
> On Thu, Apr 16, 2009 at 02:38:34PM +0100, Valery Kholodkov wrote:
> 
> [...]
> 
> > > Alternatively, this may be handled by something like
> > > 
> > >     set $mogilefs_failover 1;
> > >     proxy_pass $mogilefs_path;
> > > 
> > > with appropriate lookup of $mogilefs_failover in code before 
> > > returning value for $mogilefs_path.
> > 
> > This is impossible, because I do not evaluate $mogilefs_path
> variable dynamically. nginx discards all modules' context when it does
> an internal redirect. Instead, I simply assign a value to variable and
> the value survives during internal redirect.
> 
> You may preserve old context by (surprise!) assigning it to a 
> variable.  But it seems overkill for me, too. :)

Yes. This looks like a dirty hack. Personally, I was surprised when I discovered that redirects clear contexts.

-- 
Regards,
Valery Kholodkov





More information about the nginx mailing list