quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Dumpleton <grah...@dscpl.com.au>
Subject Re: Vote on whether to integrate server side include (SSI) support.
Date Sun, 12 Mar 2006 11:37:03 GMT

On 12/03/2006, at 9:04 PM, Graham Dumpleton wrote:

> On 12/03/2006, at 8:25 PM, André Malo wrote:
>> * Graham Dumpleton wrote:
>>> Not seeing any negatives, I am going to go ahead and commit the SSI
>>> stuff. Comments that this is just another way to skin a cat are true,
>>> even if a small cat.  I guess the reason for doing it is to fill out
>>> those basic features that can be filled out by using just what Apache
>>> provides.
>> If that's a point, you know, what would be really great in this case? 
>> To be
>> able to register own SSI handlers using mod_python instead of (or in
>> addition to) this generic #python thingy, which nobody really seems 
>> to be
>> able to classify/justify. Like registering a name and a callback 
>> function
>> with a fixed signature.
>> What do you think?
> I did think about it but deferred the idea in preference to at least
> getting some basic support for use of Python code with SSI in place.
> In other words, to take this initial step and then see whether people
> even consider using server side includes a viable way of doing stuff.
> These days there is so much focus on full blown frameworks that I am
> not sure that SSI even gets used much. I could well be wrong on that
> point.
> Do you have examples of SSI tag handlers that you might implement this
> way if such a feature were available? I ask as it all good to speculate
> on such a feature, but like this generic "#python" tag, would it in
> itself be used either?

BTW, I should point out that one of the reasons for not rushing straight
into allowing tag handler registration is that the same can be achieved
with what is provided, albeit just more verbose and still exposing the
fact that Python is used. All you need to do is put your common code 
the tag handler would do in a Python function, import that module and
call it. That is, you don't have to enumerate the complete code within
the actual file being processed by mod_includes. The function can either
query filter.req.subprocess_env for input parameters, or the point in
the file where it is called can extract out the required values and pass
them as explicit arguments to the function being called.

All you thus get by having an explicit registered tag is that that 
is used can be hidden and a user would be none the wiser.


View raw message