httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian McCallister" <>
Subject Re: mod_lua headers_out
Date Mon, 12 Jan 2009 16:59:44 GMT
On Mon, Jan 12, 2009 at 2:07 AM, Bertrand Mansion <> wrote:

.. snip ..

>> Does that work?
> Yes, it will work, thank you :)
> The advantage of having a function instead of a table for setting
> headers_in/headers_out is that you can use luaL_checkstring() to make
> sure the given parameters are of the correct type. I don't know what
> the patch will return if someone tries to set a table like in
> headers_out['Foo'] = {Bar = 'baz'}
> Maybe it is possible to set a metatable for headers_in/headers_out
> that would check on __index and __newindex if the value validates with
> luaL_checkstring (just thinking out loud).

I believe it does -- header_in and headers_out are boxed apr_table_t
instances and the only thing they have in their metatable are __index
and __newindex. If they are not checking for strings, that is a bug as
apr_table_t is string only.


View raw message