You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by James Peach <jp...@apache.org> on 2012/11/21 00:56:05 UTC
Re: lua remap lugin
On 20/11/2012, at 3:34 PM, Luca Rea <lu...@contactlab.com> wrote:
> Hi James,
> how can I list all headers in the lua remap plugin?
Eventually I'd like the pairs() function to work on the headers table, so you would do this:
url = request:url()
for hdr, val in pairs(url.headers) do
-- something
end
Give it a try, but I don't think this is hooked up to the Lua runtime. You can insert, modify and delete headers (delete by setting them to nil). I don't have a good use case for iterating the headers other than debugging. If you can come up with a better reason, I'll look into adding the necessary support.
J