httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lewis <>
Subject Re: header parser returning DECLINED
Date Fri, 10 Nov 2006 15:18:28 GMT
Brian McQueen wrote:
> I have a header parser that is returning DECLINED when the headers
> show a problem.  I thought that since the header parser was part of my
> module, that a DECLINED from the header parser would be the same as
> the entire module declining to handle the request.  It seems that it
> is only the headers parser that is declining to handle the request
> during the header parser phase, but the module's content generator is
> still being activated during the content getneration phase.  So each
> phase uses the handlers independently, without regard to the return
> status of the previous phases within the same module?
Right.  A module should be able to be just a content generator, a header 
parser, or both.  If the module has registered the hooks, apache will 
send the request for that hook when the time comes.  This is because 
some modules will implement clean up routines even if they don't handle 
anything on the request (such as clearing older cache entries).

If you want the content generation to not work if the parser returned 
declined, it may be easier to add a flag to your per-request 
configuration and set it in the parsing, then just return DECLINED at 
the start of the content generation function if the flag is not set 


View raw message