[mod_python] Crash on getting request's allowed_xmethods an boundary

D

Daniele Varrazzo

Hi everybody,

i'm experiencing crashing of the apache process when a mod_python handler
access the properties "boundary" and "allowed_xmethods" of the request
argument. This prevents the use of some interactive remote debuggers (such
ActiveState's) that try to read the contents of the variables in the
namespace and graphically present them in tree form.

I reported the crash on win32 platform. I am using python 2.3.4, apache
2.0.47, mod_python 3.1.3.

To show the bug here is a simple handler. It publishes the content of the
req object. Clicking on the url, the property is read and published.
Clicking on one of "allowed_xmethods" or "boundary" crashes apache. Actually
a plain read such as "x = req.boundary" is enough to crash.

from mod_python import apache

def handler(req):
req.write("<html><body>")
if req.args is None:
for k in dir(req):
req.write("<a href=%s?attr=%s>request.%s</a><br/>"
% (req.uri, k, k))
else:
attr = dict([ t.split('=') for t in req.args.split('&') ])['attr']
req.write(str(getattr(req, attr)))

req.write("</body></html>")
return apache.OK

I published the script through:

<Directory "C:/httproot/test">
AddHandler python-program .py
PythonHandler mptest
PythonDebug On
PythonPath "['C:/httproot/test']+sys.path"
</Directory>

Daniele

P.S. is this the proper forum to post mod_python bugs? I'm not so sure...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top