Updated: (MODPYTHON-160) req.add_handler/req.handler and
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 > Updated: (MODPYTHON-160) req.add_handler/req.handler and




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

    Updated: (MODPYTHON-160) req.add_handler/req.handler and  
Graham Dumpleton (JIRA)


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


 
04-18-06 05:07 AM

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

Graham Dumpleton updated MODPYTHON-160:
---------------------------------------

Version: 3.2.8
(was: 3.3)

Actually, one doesn't need to set req.handler as SetHandler/AddHandler in Ap
ache configuration will set up same scenario. Example given was actually doi
ng both when it should have been doing one or the other. As such, this probl
em can be triggered in mod_
python 3.2.8 as well.

> req.add_handler/req.handler and PythonInterpPerDirective
> --------------------------------------------------------
>
>          Key: MODPYTHON-160
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-160
>      Project: mod_python
>         Type: Bug

>   Components: core
>     Versions: 3.2.8
>     Reporter: Graham Dumpleton
>     Assignee: Graham Dumpleton

>
> MODPYTHON-125 made req.handler writable. Being able to now do this has unc
overed a bug whereby if PythonInterpPerDirective is used mod_python can caus
e Apache to crash. Code to trigger the problem is:
> # .htaccess
> SetHandler mod_python
> PythonInterpPerDirective On
> PythonFixupHandler interpreter_1
> # interpreter_1.py
> from mod_python import apache
> def fixuphandler(req):
>     req.log_error("fixuphandler")
>     req.log_error("interpreter=%s"%req.interpreter)
>     req.log_error("directory=%s"%req.hlist.directory)
>     req.handler = "mod_python"
>     req.add_handler("PythonHandler","interpreter_1")
>     return apache.OK
> def handler(req):
>     req.log_error("handler")
>     req.log_error("interpreter=%s"%req.interpreter)
>     req.log_error("directory=%s"%req.hlist.directory)
>     req.content_type = 'text/plain'
>     req.write('hello')
>     return apache.OK
> In summary, if PythonHandler is not used in Apache configuration to enable mod_pyt
hon but it is done by assignment to req.handler in fixup phase and then req.add_hand
ler() is used to add a handler to be called for content phase, and PythonInterpPerDi
rec
tive is being used, mod_python will cause Apache to crash.
> Location of crash not yet identified.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:55 AM.      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