Bug: Hang on subscripted access to request.subprocess_env.
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Bug: Hang on subscripted access to request.subprocess_env.




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Bug: Hang on subscripted access to request.subprocess_env.  
Alan Kennedy


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-28-06 06:14 PM

Greetings,

I think the following may be a bug in mod_python. I can't seem to find a
bug database or tracker for mod_python?

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?

The environment is

Apache:     2.0.59
ModPython:  3.2.10
Python:     2.4
OS:         Windows Server 2003

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.

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

Regards,

Alan.







[ Post a follow-up to this message ]



    Re: Bug: Hang on subscripted access to request.subprocess_env.  
Jim Gallacher


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-28-06 06:14 PM

Alan Kennedy wrote:
> Greetings,
>
> I think the following may be a bug in mod_python. I can't seem to find a
> bug database or tracker for mod_python?

http://issues.apache.org/jira/browse/MODPYTHON

No time to investigate right now. I'll take a look tonight.

Jim

> 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?
>
> The environment is
>
> Apache:     2.0.59
> ModPython:  3.2.10
> Python:     2.4
> OS:         Windows Server 2003
>
> 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.
>
> # -=-=-=
> d = {}
> for sek in request.subprocess_env.keys():
>   d[sek] = request.subprocess_env[sek]
> # -=-=-=
>
> Regards,
>
> Alan.
>
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:05 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register