httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian McCallister" <bri...@skife.org>
Subject Re: mod_lua headers_out
Date Sun, 11 Jan 2009 20:27:42 GMT
On Sun, Jan 11, 2009 at 4:21 AM, Bertrand Mansion <bmansion@mamasam.net> wrote:

.. snip ..

> I have
> followed the development of mod_wombat and noticed that you changed
> the way headers_in and headers_out are accessed, they were previously
> tables

I would actually prefer to make them tables again -- in particular, to
put the  apr_table_t instance directly in as a boxed userdata.

Paul, any particular reason for making it a function rather than userdata?

>
> Anyway, with this patch, you can do:
> r:headers_out('Location', 'http://www.example.com') -- set the Location header
> r:headers_out('Location) -- return the current value for header Location
> r:headers_out('Location', nil) -- unset the Location header
>
> There might be other options I haven't implemented for example:
>
> r.headers_out['Location'] = 'http://www.example.com' -- like in
> previous versions of mod_wombat
>  or
> r:headers_out{Location = 'http://www.example.com} -- but then it
> becomes harder to unset a header (?)
>  or
> r.headers_out:set('Location', 'http://www.example.com')
> r.headers_out:get('Location')
> r.headers_out:unset('Location')
>
> HTH
>
> -----
> Bertrand Mansion
> Mamasam
>

Mime
View raw message