You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Andrew <an...@aaaaaaaa.demon.co.uk> on 1996/02/21 17:48:48 UTC

*/* && DECLINED versus fixups()...

Sigh,

	ok, so in an ideal world we can use a handler for 
type */* which always DECLINEDs and it'll effectively run a little
chunk of module code before sending the headers and data out of
the server.  In the real world however, each module that does this
will have to coexist with others (see http_config.c:invoke_handler())
and will just have to pray that none of the others invokes a handler
first.

The 'clever' way round this is to ensure that the modules which
rely on */* && DECLINED aways get called before the ones which
intend to return OK, and this assumes that the guy who built the
Configuration knows what day it is, and which order to define the
modules.

The real world precludes any 'clever'ness on the part of the user
however and if the modules are to have any surety of working then
they should find more robust ways of ensuring that they get invoked
at the right time.  From my point of view this implies a pre-send()
hook, invoked after the fixup() hook and before the data gets
flushed to the browser.

So we're back to having to cludge up the API to get it to do what
we want.

Not to worry, I rolled back contrib/module's mod_cern_meta.c and
mod_expires.c to use the fixup() behaviour instead of */* handlers.
Vesion numbers have been incremented still, so people who make a
point of looking at the numbers will be sure to change to the
working (older) spec.

Ay.

Re: */* && DECLINED versus fixups()...

Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Wed, 21 Feb 1996, Andrew wrote:

> 	ok, so in an ideal world we can use a handler for 
> type */* which always DECLINEDs and it'll effectively run a little
> chunk of module code before sending the headers and data out of
> the server.  In the real world however, each module that does this
> will have to coexist with others (see http_config.c:invoke_handler())
> and will just have to pray that none of the others invokes a handler
> first.

No prayer neccessary. By defnition, all other modules except those using 
*/* will always, regardless of placement in Configuration, go before one 
that does. As they should.

It would just be a hack anyhow. Certainly not 'clever', even if it 
worked. It was a suggestion on how it might work, but it doesn't, so I 
don't think that twisting yourself into knots to make it do so is a 
particuarly good idea. Better just to revise the API, if need be. After 
all, it's our API, we can change it if we want. The existing contains 
provisions for doing so, and a module can even use #if directives to 
behave in different ways depending on the Apache version, if it wants to 
be a contrib module, say.

--/ Alexei Kosut <ak...@nueva.pvt.k12.ca.us> /--------/ Lefler on IRC
----------------------------/ <http://www.nueva.pvt.k12.ca.us/~akosut/>
The viewpoints expressed above are entirely false, and in no way
represent Alexei Kosut nor any other person or entity. /--------------