Steve Greenland | 13 Dec 22:24

mod_alias vs. conditinal configuration

This is regarding to http://trac.lighttpd.net/trac/ticket/1427

The problem is that this config snippet:

        alias.url += ( "/a/" => "/home/olaf/a/" )

        $HTTP["remoteip"] == "127.0.0.1" {
	        alias.url += ( "/doc/" => "/usr/share/doc/" )
        }

        alias.url += ( "/b/" => "/home/olaf/b/" )

Does not do what anyone not familiar with lighttpd internals would
expect: the alias for "/b/" doesn't work. Moving it before the
conditional works. (When accessing via localhost).

The first reply to the ticket, from "moo", claims that this is
intentional. If so, it's a really strange decision, and undocumented.
Anyone want to comment? Jan?

Regards,
Steve
--

-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net

Marcus Rueckert | 14 Dec 04:49

Re: mod_alias vs. conditinal configuration

On 2007-12-13 21:27:03 +0000, Steve Greenland wrote:
> This is regarding to http://trac.lighttpd.net/trac/ticket/1427
> 
> The problem is that this config snippet:
> 
>         alias.url += ( "/a/" => "/home/olaf/a/" )

>         $HTTP["remoteip"] == "127.0.0.1" {
> 	        alias.url += ( "/doc/" => "/usr/share/doc/" )
            at this point the alias list is copied and the /doc is
            appended. so you get a and doc

>         }
> 
>         alias.url += ( "/b/" => "/home/olaf/b/" )

          so at this point you get the alias a and b.

> 
> Does not do what anyone not familiar with lighttpd internals would
> expect: the alias for "/b/" doesn't work. Moving it before the
> conditional works. (When accessing via localhost).
> 
> The first reply to the ticket, from "moo", claims that this is
> intentional. If so, it's a really strange decision, and undocumented.
> Anyone want to comment? Jan?

yes it is hard to get at first place. but yes that is how the code works
atm.

(Continue reading)

Steve Greenland | 14 Dec 05:12

Re: mod_alias vs. conditinal configuration

According to Marcus Rueckert  <darix <at> web.de>:
> On 2007-12-13 21:27:03 +0000, Steve Greenland wrote:
> >         alias.url += ( "/a/" => "/home/olaf/a/" )
> >         $HTTP["remoteip"] == "127.0.0.1" {
> > 	        alias.url += ( "/doc/" => "/usr/share/doc/" )
>             at this point the alias list is copied and the /doc is
>             appended. so you get a and doc

Why on earth is it copied?

> yes it is hard to get at first place. but yes that is how the code works
> atm.

Yeah, I get that. What I'm trying to determine is whether the
developer(s) consider this a fault to be fixed at some point, or
desirable behavior. 

Steve
--

-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net


Gmane