Issue Details (XML | Word | Printable)

Key: MODPYTHON-187
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Graham Dumpleton
Reporter: Alan Kennedy
Votes: 0
Watchers: 0
Operations

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

Hang on subscripted access to request.subprocess_env.

Created: 28/Aug/06 03:40 PM   Updated: 01/May/07 10:46 AM
Return to search
Component/s: core
Affects Version/s: 3.2.10
Fix Version/s: 3.3.1

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works MP187-2006-08-28-jgallacher-1.diff 2006-08-29 12:51 AM Jim Gallacher 0.7 kB
Environment:
Apache: 2.0.59
ModPython: 3.2.10
Python: 2.4
OS: Windows Server 2003

Resolution Date: 02/Oct/06 04:51 AM


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

# -=-=-=-=-=-=

def postreadrequesthandler(request):
  request.add_common_vars()
  value = request.subprocess_env['SCRIPT_FILENAME'] # This hangs
# value = request.subprocess_env.get('SCRIPT_FILENAME')# This works
  return apache.OK

# -=-=-=-=-=-=

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.

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


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jim Gallacher made changes - 29/Aug/06 12:51 AM
Field Original Value New Value
Attachment MP187-2006-08-28-jgallacher-1.diff [ 12339728 ]
Graham Dumpleton made changes - 11/Sep/06 10:28 AM
Fix Version/s 3.3 [ 12310101 ]
Graham Dumpleton made changes - 02/Oct/06 03:21 AM
Assignee Graham Dumpleton [ grahamd ]
Graham Dumpleton made changes - 02/Oct/06 03:21 AM
Status Open [ 1 ] In Progress [ 3 ]
Graham Dumpleton made changes - 02/Oct/06 04:51 AM
Resolution Fixed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
Graham Dumpleton made changes - 01/May/07 10:46 AM
Status Resolved [ 5 ] Closed [ 6 ]