From: Daniel Gruno
In general, a hook function is one that Apache will call at - some point during the processing of a request. Modules can - provide functions that are called, and specify when they get - called in comparison to other modules.
+In general, a hook function is one that the Apache HTTP Server + will call at some point during the processing of a request. + Modules can provide functions that are called, and specify when + they get called in comparison to other modules.
The first hook that does not return DECLINED
stops the loop and its return value is returned from the hook
- caller. Note that DECLINED
is the tradition Apache
- hook return meaning "I didn't do anything", but it can be
+ caller. Note that DECLINED
is the traditional
+ hook return value meaning "I didn't do anything", but it can be
whatever suits you.
Alternatively, all hooks can be run until an error occurs. @@ -163,7 +163,7 @@
During initialisation, Apache will call each modules hook +
During initialisation, the server will call each modules hook registering function, which is included in the module structure:
@@ -198,9 +198,9 @@ order relative to each other, but, of course, all modules usingAPR_HOOK_FIRST
will be run before APR_HOOK_MIDDLE
which are before APR_HOOK_LAST
. Modules that don't care
- when they are run should use APR_HOOK_MIDDLE
. (I spaced
- these out so people could do stuff like APR_HOOK_FIRST-2
- to get in slightly earlier, but is this wise? - Ben)
+ when they are run should use APR_HOOK_MIDDLE
. These
+ values are spaced out, so that positions like APR_HOOK_FIRST-2
+ are possible to hook slightly earlier than other functions.
Note that there are two more values,
APR_HOOK_REALLY_FIRST
and APR_HOOK_REALLY_LAST
. These
@@ -229,7 +229,6 @@
ordering set by APR_HOOK_ORDER
is preserved, as far
as is possible.
Ben Laurie, 15th August 1999