Uploaded image for project: 'mod_python'
  1. mod_python
  2. MODPYTHON-206

The attribute req.used_path_info should be writable.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.x
    • Fix Version/s: 3.3.1
    • Component/s: core
    • Labels:
      None

      Description

      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

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            grahamd Graham Dumpleton
            Reporter:
            grahamd Graham Dumpleton
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development