httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch ...@sfritsch.de>
Subject Re: Additional core functions for mod_lua
Date Sun, 05 Aug 2012 22:17:55 GMT
On Sunday 05 August 2012, Daniel Gruno wrote:
> On 08/03/2012 04:51 PM, Igor Galić wrote:
> > I cannot seem to be able to find this stuff…
> 
> I have put together some of the scripts I use myself at
> http://httpd.apache.org/docs/trunk/developer/lua.html but it's far
> from done (and thus not linked to from any index page). Most of
> the scripts are there, but I have yet to add actual explanations
> to the various examples as well as add the map handler examples
> and some other things.
> 
> This page also holds all the functions that I have proposed to
> import into mod_lua (unless someone objects to specific
> functions), so this should answer Eric's question about
> documenting the functions as well.
> 
> I have chosen to add the functions to the existing apache2 library,
> since the name makes sense. If there are no objections, I'll
> consider it a lazy consensus :)

Nice work. If you talk about the "existing apache2 library", you mean 
it is existing in mod_lua? Or is it an external file?

There is some overlap with the r table: These already exist:

apache2.context_document_root
apache2.context_prefix
apache2.add_output_filter

These can be done wit r.subprocess_env:

apache2.getenv
apache2.setenv

(though subprocess_env could use an abbreviation). I may have missed 
some others.

Wouldn't it make sense to add those new functions which are really 
related to the request (as opposed to just using the request pool) to 
the r table, too?

Some other random notes:

apache2.requestbody: This should take a size limit as argument.

apache2.get_server_name: The example and the synopsis don't agree if 
this should have an argument

apache2.get_server_name_for_url: This is missing but would be very 
useful.

apache2.satisfies: This is obsolete, and should IMHO be removed.

apache2.getenv/setenv: call them "request environment variable" in the 
docs, to distinguish from OS environment variables

Cheers,
Stefan

Mime
View raw message