httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Temme <>
Subject Re: why is my module being called for all pages?
Date Sun, 12 Aug 2007 22:20:56 GMT

On Aug 12, 2007, at 3:13 PM, Mark Harrison wrote:

> warning: newbie alert!

We all were newbies once.

> I've got a simple module as detailed below.  I based it off
> of the example module, stripping it down to the smallest
> example I could.
> It seems to be working, but it is getting called on all
> web pages.  Can someone loan me a clue as to:
> 1.  why it is being called on all pages, not just the
>     one I've specified in <Location>?

All hooks are called for all requests.  For run-all hooks, the  
handlers of all modules will be called.  For run-first hooks, hook  
handlers for all modules are called until one returns something other  

> 2.  what do I need to do to fix it?

Pull in a little bit more from mod_example, where it makes a string  
comparison to the handler name.  If matched, do your thing.  If not  
matched, return DECLINED.

Your module will always be called, so keep the code path used to  
decline handling as short as possible.


Sander Temme
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF

View raw message