Apache Mod-Python - Commented: (MODPYTHON-104) Allow Python code callouts with

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > May 2006 > Commented: (MODPYTHON-104) Allow Python code callouts with





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 Commented: (MODPYTHON-104) Allow Python code callouts with
Graham Dumpleton (JIRA)

2006-05-08, 1:12 pm

[ http://issues.apache.org/jira/brows...action_12378409 ]

Graham Dumpleton commented on MODPYTHON-104:
--------------------------------------------

The Apache crash when a Python exception occurs has been eliminated, but at the same time have disabled details of any Python exception being rendered into any page sent as result to client even if PythonDebug is On. The rendered page will show the messag
e:

[an error occurred while processing this directive]

which seems to be more consistent with how SSI handlers work. If found that mod_perl as a comparison, does in some cases render details of exception into page, then maybe this can be changed back at some point.

Note that although the crash has been eliminated, it can still be triggered if filter.disable() is called from Python code executed from SSI code somehow. There perhaps need to be some flag maintained in mod_python filterobject so that the context in whic
h the filter_rec wrapper is used is known and for filter.disable() to only do something when used for an input/output filter and not in other use cases. Other functions of filter object need to be reviewed to see if they might cause other problems if used
from an include filter.

> Allow Python code callouts with mod_include (SSI).
> --------------------------------------------------
>
> Key: MODPYTHON-104
> URL: http://issues.apache.org/jira/browse/MODPYTHON-104
> Project: mod_python
> Type: New Feature


> Components: core
> Reporter: Graham Dumpleton
> Assignee: Graham Dumpleton
> Fix For: 3.3
> Attachments: MP104_20060317_jgallacher_1.diff, grahamd_20060126_1_mod_include.diff, grahamd_20060226_MP104_1.diff
>
> The mod_include module supporting server side includes (SSI), provides a means of registering new element tags which trigger callouts to other code in separate Apache modules. This is used for example in mod_perl to allow PERL language code to be used w

ith server side includes:
> <!--#perl sub="MySSI::remote_host" -->
> <!--#perl arg="Hello" arg="SSI" arg="World"
> sub="sub {
> my($r, @args) = @_;
> print qq(@args);
> }"
> -->
> An equivalent feature for Python was previously asked about on the mailing list back in 2004:
> http://www.modpython.org/pipermail/...ary/014832.html
> Since it seems entirely reasonable that such integration of mod_python and mod_include would be possible, thought it would be good to log it as a possible new feature.
> Because of SSI's support for basic conditionals, includes and other callout mechanisms, would be a good quick and dirty way of doing templating without having to resort to PSP, or other high level templating systems.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com