[ http://issues.apache.org/jira/browse/MODPYTHON-206?page=all ]

Graham Dumpleton resolved MODPYTHON-206.

    Resolution: Fixed

> The attribute req.used_path_info should be writable.
> ----------------------------------------------------
>                 Key: MODPYTHON-206
>                 URL: http://issues.apache.org/jira/browse/MODPYTHON-206
>             Project: mod_python
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.3
>            Reporter: Graham Dumpleton
>         Assigned To: Graham Dumpleton
>             Fix For: 3.3
> At present, req.used_path_info is read only. This should instead be 
> modifiable as well.
> This attribute gets set when you use the Apache AcceptPathInfo directive. You 
> might use it for example as:
> <Files "mypaths.shtml">
> Options +Includes
> SetOutputFilter INCLUDES
> AcceptPathInfo On
> </Files>
> In this case use of AcceptPathInfo would be needed as the default-handler for 
> serving up static files prohibits additional path info by default. Thus, if 
> you want SSI files to be able to make use of additional path info, you have 
> to enable it.
> In mod_python 3.3, the ability to register filters dynamically just for the 
> current request means that SSI can be set up from within a fixuphandler using:
> def fixuphandler(req):
>     if os.path.basename(req.filename) == 'mypaths.shtml':
>         req.add_output_filter('INCLUDES')
>     return apache.OK
> Without req.used_path_info being modifiable though, one can't do the 
> equivalent to AcceptPathInfo from within the handler. Thus, 
> req.used_path_info should be modifiable. The values this attribute needs to 
> be set to are already specified in mod_python.apache
> and thus only needs one line change to requestobject.c because value is an 
> integer. The handler could then be written as:
> def fixuphandler(req):
>     if os.path.basename(req.filename) == 'mypaths.shtml':
>         req.add_output_filter('INCLUDES')
>         req.used_path_info = apache.AP_REQ_ACCEPT_PATH_INFO
>     return apache.OK

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: http://www.atlassian.com/software/jira


Reply via email to