You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jeffrey Walton <no...@gmail.com> on 2020/04/27 21:59:24 UTC
[users@httpd] How to enable a module for each request?
Hi Everyone,
I'm having trouble figuring out how to enable my module for all
requests. The module is loading via
/etc/httpd/conf.modules.d/00-base.conf. After it is loaded and
registers the hook it is never called.
Here is the register_hook function, which is called.
static void register_hook(apr_pool_t *pool)
{
/* Similar to ap_hook_handler, except it is run before any
other request hooks */
ap_hook_quick_handler(my_handler, NULL, NULL, APR_HOOK_FIRST);
}
This is never called, however.
static int my_handler(request_rec *r, int unknown)
{
...
}
I think I need to do something for the "Fixups" case discussed at
https://httpd.apache.org/docs/current/developer/API.html. It seems to
be the closest to what I want to do. My problem is, I don't know
exactly what is needed.
If it matters, the desired behavior of the plugin is inspect every
request the webserver processes after the request is canonicalized
(i.e., packaged into a request_rec structure). The plugin does not
return pages. It merely performs analysis and develops statistics.
What is needed to have the module invoked for each request?
Thanks in advance.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org