httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akins, Brian" <>
Subject [PATCH] mod_wombat: add table_get and table_set
Date Fri, 27 Apr 2007 17:48:23 GMT
Probably not the best way to do this, but adds ability to get/set on
r->headers_in and r->headers_out

Example usage:

function handle(r)
  r:table_set(r.headers_out, "Lua", "Cool");
  val = r:table_get(r.headers_in, "User-Agent");
  r:puts("User-Agent: " .. val .. "\n");

FWW, I had never done any lua until this morning, so I'm sure it can be done
better.  I'm not a huge fan of just wrapping apr_table_get/set, but wasn't
sure if I shoved them into a lua table that I could keep them (the apr table
and the lua table) in sync.

Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies

View raw message