Actions
Feature #1967
closedMake CGI environment accessible to mod_magnet and lua scripts
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
Updated by stbuehler over 15 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset r2515.
Actions
Also available in: Atom