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

Hang on subscripted access to request.subprocess_env.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.10
    • 3.3.1
    • core
    • None
    • 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

        1. MP187-2006-08-28-jgallacher-1.diff
          0.7 kB
          James Paul Gallacher

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: