
|
If you were logged in you would be able to see more operations.
|
|
|
|
File Attachments:
|
|
|
Environment:
|
Apache: 2.0.59
ModPython: 3.2.10
Python: 2.4
OS: Windows Server 2003
Apache: 2.0.59
ModPython: 3.2.10
Python: 2.4
OS: Windows Server 2003
|
|
| Resolution Date: |
02/Oct/06 04:51 AM
|
|
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]
# -=-=-=
|
|
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.
# -=-=-=-=-=-=
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]
# -=-=-=
|
Show » |
|