You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Laurie <be...@algroup.co.uk> on 2000/12/31 14:04:08 UTC

Order of handlers

Handlers have traditionally been ordered in reverse order of the list of
modules. This is, of course, crap. Furthermore, it doesn't appear to be
consistent any more (I just spent some time trying to figure out why my
index.html was showing earlier today and isn't now, and it isn't now
because mod_autoindex comes ahead of mod_dir, which is surely wrong
[though why it should have changed between builds escapes me - perhaps
there's a problem with ap_allow_options()?]).

Anyway, I propose that, like hooks, handlers should be able to specify
their relative order, when they feel like it. And I think I'm
volunteering to make the change :-)

This _could_ also be used to get rid of the rather kludgy direct then
wildcard matches (though we could default to use that ordering, still).

What say you?

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Re: Order of handlers

Posted by David Reid <dr...@jetnet.co.uk>.
Sounds like a good idea and should improve things.  +1 from me.

david


> Handlers have traditionally been ordered in reverse order of the list of
> modules. This is, of course, crap. Furthermore, it doesn't appear to be
> consistent any more (I just spent some time trying to figure out why my
> index.html was showing earlier today and isn't now, and it isn't now
> because mod_autoindex comes ahead of mod_dir, which is surely wrong
> [though why it should have changed between builds escapes me - perhaps
> there's a problem with ap_allow_options()?]).
> 
> Anyway, I propose that, like hooks, handlers should be able to specify
> their relative order, when they feel like it. And I think I'm
> volunteering to make the change :-)
> 
> This _could_ also be used to get rid of the rather kludgy direct then
> wildcard matches (though we could default to use that ordering, still).
> 
> What say you?
> 
> Cheers,
> 
> Ben.
> 
> --
> http://www.apache-ssl.org/ben.html
> 
> "There is no limit to what a man can do or how far he can go if he
> doesn't mind who gets the credit." - Robert Woodruff
> 


Re: Order of handlers

Posted by Ben Laurie <be...@algroup.co.uk>.
rbb@covalent.net wrote:
> 
> Hey Ben,
> 
> As long as you are hacking away on the handler stuff, what are the chances
> you could add the generic hooks we talked about in London?  Also, I agree
> with Will, it would be REALLY cool if we could specify handler order in
> the config file.

This should really be a much more general thing (for example, specifying
I/O filter order). I have some ideas, anyway, which I'm about to
summarise.

Once that's out of the way, I promise I'll think about generic hooks
(actually, I already am, but I can't concentrate while this is going
on).

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Re: Order of handlers

Posted by rb...@covalent.net.
Hey Ben,

As long as you are hacking away on the handler stuff, what are the chances
you could add the generic hooks we talked about in London?  Also, I agree
with Will, it would be REALLY cool if we could specify handler order in
the config file.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: Order of handlers

Posted by Ben Laurie <be...@algroup.co.uk>.
"Theo E. Schlossnagle" wrote:
> 
> Ben,
> 
> I know my vote doesn't count :-)

Everyone's opinion counts, especially module authors. Yes, you can't
vote in an official vote, but I wasn't asking for one of those.

>  But, without something like this, it will be
> very difficult to make something like mod_backhand to work.  Right now,
> mod_backhand completely misbehves if isn't module order isn't right.  So, by
> all means , give me more power as a module writer!
> 
> BTW, I plan on beginning to port mod_backhand to 2.0 now that a beta is close.

Cool!

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Re: Order of handlers

Posted by "Theo E. Schlossnagle" <je...@cnds.jhu.edu>.
Ben,

I know my vote doesn't count :-)  But, without something like this, it will be
very difficult to make something like mod_backhand to work.  Right now,
mod_backhand completely misbehves if isn't module order isn't right.  So, by
all means , give me more power as a module writer!

BTW, I plan on beginning to port mod_backhand to 2.0 now that a beta is close.

Ben Laurie wrote:
> Anyway, I propose that, like hooks, handlers should be able to specify
> their relative order, when they feel like it. And I think I'm
> volunteering to make the change :-)
> This _could_ also be used to get rid of the rather kludgy direct then
> wildcard matches (though we could default to use that ordering, still).
> 
> What say you?

--
Theo Schlossnagle
1024D/A8EBCF8F/13BD 8C08 6BE2 629A 527E  2DC2 72C2 AD05 A8EB CF8F
2047R/33131B65/71 F7 95 64 49 76 5D BA  3D 90 B9 9F BE 27 24 E7

Re: Order of handlers

Posted by Ben Laurie <be...@algroup.co.uk>.
"William A. Rowe, Jr." wrote:
> 
> > From: Ben Laurie [mailto:ben@algroup.co.uk]
> > Sent: Sunday, December 31, 2000 8:10 AM
> >
> > > > From: Ben Laurie [mailto:ben@algroup.co.uk]
> > > > Sent: Sunday, December 31, 2000 7:04 AM
> > > >
> > > > Anyway, I propose that, like hooks, handlers should be able to specify
> > > > their relative order, when they feel like it. And I think I'm
> > > > volunteering to make the change :-)
> > >
> > > Do you plan to provide an 'override' such that module authors, especially,
> > > can force a reorg?
> 
> Let us suppose we have modules that are round-robin, such as authorization.
> Wouldn't it make sense to allow the administrator to 'push' an authorization
> module before or after another such module?

Yes.

> 
> > I don't understand what you mean by this.
> 
> Expecially for module authors who are trying to determine the side-effects
> of their module's placement.  Sure beats recompiling dozens of times.

Gotcha.

> > >  Heck, maybe an .html on "Why does Apache order modules
> > > thusly, and where should I stick my module?"
> >
> > I'm trying to eliminate the need to answer that question...
> 
> Understood ... module authors still need to understand the concept.
> 
> What about a delta argument after the addmodule/loadmodule modname argument?
> So if it's +3, I'm moving it's order by 3 (forward?  backwards?  good q.)
> If a module publisher is trying to accomplish something specific, they can
> document what to set that arg, and why, and what the side effects are.

Ick. No. That's why we have tsort for hooks. Anyway, I'm about to write
a more detailed missive.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

RE: Order of handlers

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: Ben Laurie [mailto:ben@algroup.co.uk]
> Sent: Sunday, December 31, 2000 8:10 AM
> 
> > > From: Ben Laurie [mailto:ben@algroup.co.uk]
> > > Sent: Sunday, December 31, 2000 7:04 AM
> > >
> > > Anyway, I propose that, like hooks, handlers should be able to specify
> > > their relative order, when they feel like it. And I think I'm
> > > volunteering to make the change :-)
> > 
> > Do you plan to provide an 'override' such that module authors, especially,
> > can force a reorg?

Let us suppose we have modules that are round-robin, such as authorization.
Wouldn't it make sense to allow the administrator to 'push' an authorization
module before or after another such module?

> I don't understand what you mean by this.

Expecially for module authors who are trying to determine the side-effects
of their module's placement.  Sure beats recompiling dozens of times.

> >  Heck, maybe an .html on "Why does Apache order modules
> > thusly, and where should I stick my module?"
> 
> I'm trying to eliminate the need to answer that question...

Understood ... module authors still need to understand the concept.

What about a delta argument after the addmodule/loadmodule modname argument?
So if it's +3, I'm moving it's order by 3 (forward?  backwards?  good q.)
If a module publisher is trying to accomplish something specific, they can
document what to set that arg, and why, and what the side effects are.

Re: Order of handlers

Posted by Ben Laurie <be...@algroup.co.uk>.
"William A. Rowe, Jr." wrote:
> 
> > From: Ben Laurie [mailto:ben@algroup.co.uk]
> > Sent: Sunday, December 31, 2000 7:04 AM
> >
> > Anyway, I propose that, like hooks, handlers should be able to specify
> > their relative order, when they feel like it. And I think I'm
> > volunteering to make the change :-)
> 
> Do you plan to provide an 'override' such that module authors, especially,
> can force a reorg?

I don't understand what you mean by this.

>  Heck, maybe an .html on "Why does Apache order modules
> thusly, and where should I stick my module?"

I'm trying to eliminate the need to answer that question...

> > What say you?
> 
> I know this has been discussed, but I don't remember the conclusion?
> If there is an override, I'm +1 :-)  I'd rather see ordinal control of
> the load order rather than position dependence anyways, seeing as we
> have this huge problem of multiple .confs in the httpd.d directory
> feature.  It would be nice to say "Apache 2.0 is simpler and safer to use."

Quite so.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Re: Order of handlers

Posted by David Reid <dr...@jetnet.co.uk>.
>
> Do you plan to provide an 'override' such that module authors, especially,
> can force a reorg?  Heck, maybe an .html on "Why does Apache order modules
> thusly, and where should I stick my module?"

If we have ordering then this shouldn't be needed should it?

david



RE: Order of handlers

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: Ben Laurie [mailto:ben@algroup.co.uk]
> Sent: Sunday, December 31, 2000 7:04 AM
> 
> Anyway, I propose that, like hooks, handlers should be able to specify
> their relative order, when they feel like it. And I think I'm
> volunteering to make the change :-)
 
Do you plan to provide an 'override' such that module authors, especially,
can force a reorg?  Heck, maybe an .html on "Why does Apache order modules
thusly, and where should I stick my module?"

> What say you?

I know this has been discussed, but I don't remember the conclusion?
If there is an override, I'm +1 :-)  I'd rather see ordinal control of
the load order rather than position dependence anyways, seeing as we
have this huge problem of multiple .confs in the httpd.d directory
feature.  It would be nice to say "Apache 2.0 is simpler and safer to use."