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

Hang on subscripted access to request.subprocess_env.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.10
    • Fix Version/s: 3.3.1
    • Component/s: core
    • Labels:
      None
    • Environment:
      Apache: 2.0.59
      ModPython: 3.2.10
      Python: 2.4
      OS: Windows Server 2003

      Description

      When subscripted access is used to access variable 'SCRIPT_FILENAME' in the request.subprocess_env table/mapping, the code hangs.

      The following snippet illustrates the problem.

      1. ======

      def postreadrequesthandler(request):
      request.add_common_vars()
      value = request.subprocess_env['SCRIPT_FILENAME'] # This hangs

      1. value = request.subprocess_env.get('SCRIPT_FILENAME')# This works
        return apache.OK
      1. ======

      The strange thing is that the .get() access works fine: only the subscript hangs?

      If anyone is wondering about a use-case, I don't actually have one. I was just iterating over the contents of the request.subprocess_env using a for loop (code below), and found that the code hung when accessing 'SCRIPT_FILENAME', and not for any other variable.

      1. ==-=
        request.add_common_vars()
        d = {}
        for sek in request.subprocess_env.keys():
        d[sek] = request.subprocess_env[sek]
      2. ==-=

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: