Add means of optionally merging handlers from parent context into a child 

         Key: MODPYTHON-162
     Project: mod_python
        Type: New Feature

  Components: core  
    Reporter: Graham Dumpleton

Blantently stealing documentation from mod_perl, would be nice to have an 
equivalent to the following feature.


Turn on merging of Perl*Handler arrays. For example with a setting:

  PerlFixupHandler Apache2::FixupA
  <Location /inside>
      PerlFixupHandler Apache2::FixupB

a request for /inside only runs Apache2::FixupB (mod_perl 1.0 behavior). But 
with this configuration:

  PerlFixupHandler Apache2::FixupA
  <Location /inside>
      PerlOptions +MergeHandlers
      PerlFixupHandler Apache2::FixupB

a request for /inside will run both Apache2::FixupA and Apache2::FixupB 

Currently mod_python behaves like mod_perl 1.0 in that specifing a handler in a 
child context will cause any handler for the same phase in a parent context to 
be totally ignored. In mod_perl 2.0, you can use the MergeHandlers option to 
say that list of handlers for a parent can be merged with those a of a parent 

In mod_perl 2.0 it is an all or nothing affair. Ie., you cant say that you only 
want handlers for specific phases merged. It might be worth investigating 
whether it could be more flexible. For example:

  PythonFixupHandler FixupA
  <Location /inside>
      PythonMergeHandlers +PythonFixupHandler
      PythonFixupHandler FixupB

  <Location /inside/inside>
      PythonMergeHandlers -PythonFixupHandler
      PythonFixupHandler FixupC

Thus, if /, runs FixupA, if /inside, runs FixupA and FixupB. If /inside/inside, 
runs FixupC. Ie., '-' resets back to default of not merging with parent.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

Reply via email to