Issue Details (XML | Word | Printable)

Key: MODPYTHON-206
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Graham Dumpleton
Reporter: Graham Dumpleton
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
mod_python

The attribute req.used_path_info should be writable.

Created: 19/Nov/06 02:31 AM   Updated: 01/May/07 10:56 AM
Return to search
Component/s: core
Affects Version/s: 3.3.x
Fix Version/s: 3.3.1

Time Tracking:
Not Specified

Resolution Date: 19/Nov/06 02:40 AM


 Description  « Hide
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


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Graham Dumpleton made changes - 19/Nov/06 02:32 AM
Field Original Value New Value
Status Open [ 1 ] In Progress [ 3 ]
Graham Dumpleton made changes - 19/Nov/06 02:40 AM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Graham Dumpleton made changes - 01/May/07 10:56 AM
Status Resolved [ 5 ] Closed [ 6 ]