Project

General

Profile

Actions

Feature #1967

closed

Make CGI environment accessible to mod_magnet and lua scripts

Added by presbrey almost 15 years ago. Updated almost 15 years ago.

Status:
Fixed
Priority:
Normal
Category:
mod_magnet
Target version:
-
ASK QUESTIONS IN Forums:

Description

This patch makes the CGI environment accessible to lua scripts via mod_magnet.
I tested both get and set methods during both directives: magnet.attract-raw-url-to and magnet.attract-physical-path-to.

The 'lighty' namespace is extended with a new table: lighty.cgi.

Example

print("KRB5CCNAME: " .. lighty.cgi["KRB5CCNAME"] .. " (" .. string.len(lighty.cgi["KRB5CCNAME"]) .. ")")
-- os.spawn('aklog', env={'KRB5CCNAME': lighty.cgi["KRB5CCNAME"]})

Output:
2009-04-27 10:12:10 (mod_magnet.c:197) (lua-print) KRB5CCNAME: /tmp/krb5cc_gssapi_AE3Gxu (25)

Other Notes

As you might have guessed from my example, I developed this for use with the KRB5CCNAME environment variable that is set by my GSSAPI patch: Feature #1899. There are endless uses for this feature, however.


Files

lighty-mod_magnet-r2476.patch (2.16 KB) lighty-mod_magnet-r2476.patch presbrey, 2009-04-27 14:29
Actions #1

Updated by stbuehler almost 15 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2515.

Actions

Also available in: Atom