[mod_python] Directory wildcard handling

Kevin Quick modpy at sparq.org
Wed Jul 13 18:59:51 EDT 2005


Attached is a patch that does two things:

1) On module import failures, logfile contains additional information showing
   system paths as well as module name.

2) Support of Python*Handler found in a wildcard-based directory.  For example,

<IfModule mod_python.c> 
    <Directory /home/*/public_html/python> 
        AddHandler mod_python .py 
        PythonHandler helloworld 
        PythonDebug on 
    </Directory> 
</IfModule> 

which mirrors a corresponding perl setting and would allow the user to
place a mod_python handler in their $HOME/public_html/python directory.

In the current code, the wildcard is not translated, the sys.path update
will be invalid, and the user's module will not be accessible.  The attached
patch provides a fix for this.

N.B. There are obvious security issues in using this type of configuration,
but this is very useful for dev environments, and security would implemented
via explicit alternatives anyhow.

-- 
-KQ




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kwq_path_cvsdiff.diff
Type: application/octet-stream
Size: 1185 bytes
Desc: not available
Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050713/90af2c68/kwq_path_cvsdiff.obj


More information about the Mod_python mailing list