Apache Mod-Python - Work started: (MODPYTHON-187) Hang on subscripted access to

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > October 2006 > Work started: (MODPYTHON-187) Hang on subscripted access to





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Work started: (MODPYTHON-187) Hang on subscripted access to
Graham Dumpleton (JIRA)

2006-10-02, 1:14 am

[ http://issues.apache.org/jira/brows...ON-187?page=all ]

Work on MODPYTHON-187 started by Graham Dumpleton.

> Hang on subscripted access to request.subprocess_env.
> -----------------------------------------------------
>
> Key: MODPYTHON-187
> URL: http://issues.apache.org/jira/browse/MODPYTHON-187
> Project: mod_python
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.10
> Environment: Apache: 2.0.59
> ModPython: 3.2.10
> Python: 2.4
> OS: Windows Server 2003
> Reporter: Alan Kennedy
> Assigned To: Graham Dumpleton
> Fix For: 3.3
>
> Attachments: MP187-2006-08-28-jgallacher-1.diff
>
>
> 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]
> # -=-=-=


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com