You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by "Graham Dumpleton (JIRA)" <ji...@apache.org> on 2006/04/16 03:08:00 UTC

[jira] Created: (MODPYTHON-160) req.add_handler/req.handler and PythonInterpPerDirective

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.3    
    Reporter: Graham Dumpleton
 Assigned to: Graham Dumpleton 


MODPYTHON-125 made req.handler writable. Being able to now do this has uncovered a bug whereby if PythonInterpPerDirective is used mod_python can cause 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_python but it is done by assignment to req.handler in fixup phase and then req.add_handler() is used to add a handler to be called for content phase, and PythonInterpPerDirective is being used, mod_python will cause Apache to crash.

Location of crash not yet identified.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MODPYTHON-160) req.add_handler/req.handler and PythonInterpPerDirective

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MODPYTHON-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Graham Dumpleton closed MODPYTHON-160.
--------------------------------------


> req.add_handler/req.handler and PythonInterpPerDirective
> --------------------------------------------------------
>
>                 Key: MODPYTHON-160
>                 URL: https://issues.apache.org/jira/browse/MODPYTHON-160
>             Project: mod_python
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.8
>            Reporter: Graham Dumpleton
>         Assigned To: Graham Dumpleton
>             Fix For: 3.3
>
>
> MODPYTHON-125 made req.handler writable. Being able to now do this has uncovered a bug whereby if PythonInterpPerDirective is used mod_python can cause 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_python but it is done by assignment to req.handler in fixup phase and then req.add_handler() is used to add a handler to be called for content phase, and PythonInterpPerDirective is being used, mod_python will cause Apache to crash.
> Location of crash not yet identified.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MODPYTHON-160) req.add_handler/req.handler and PythonInterpPerDirective

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-160?page=all ]
     
Graham Dumpleton resolved MODPYTHON-160:
----------------------------------------

    Fix Version: 3.3
     Resolution: Fixed

> 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
>      Fix For: 3.3

>
> MODPYTHON-125 made req.handler writable. Being able to now do this has uncovered a bug whereby if PythonInterpPerDirective is used mod_python can cause 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_python but it is done by assignment to req.handler in fixup phase and then req.add_handler() is used to add a handler to be called for content phase, and PythonInterpPerDirective is being used, mod_python will cause Apache to crash.
> Location of crash not yet identified.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Work started: (MODPYTHON-160) req.add_handler/req.handler and PythonInterpPerDirective

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-160?page=all ]
     
Work on MODPYTHON-160 started by Graham Dumpleton

> 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.3
>     Reporter: Graham Dumpleton
>     Assignee: Graham Dumpleton

>
> MODPYTHON-125 made req.handler writable. Being able to now do this has uncovered a bug whereby if PythonInterpPerDirective is used mod_python can cause 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_python but it is done by assignment to req.handler in fixup phase and then req.add_handler() is used to add a handler to be called for content phase, and PythonInterpPerDirective is being used, mod_python will cause Apache to crash.
> Location of crash not yet identified.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MODPYTHON-160) req.add_handler/req.handler and PythonInterpPerDirective

Posted by "Graham Dumpleton (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/MODPYTHON-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 Apache configuration will set up same scenario. Example given was actually doing both when it should have been doing one or the other. As such, this problem 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 uncovered a bug whereby if PythonInterpPerDirective is used mod_python can cause 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_python but it is done by assignment to req.handler in fixup phase and then req.add_handler() is used to add a handler to be called for content phase, and PythonInterpPerDirective is being used, mod_python will cause Apache to crash.
> Location of crash not yet identified.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira