Feature #1967
Make CGI environment accessible to mod_magnet and lua scripts
| Status: | Fixed | Start date: | 2009-04-27 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 100% | |
| Category: | mod_magnet | |||
| Target version: | - | |||
| Missing in 1.5.x: |
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.
Associated revisions
Add "lighty.req_env" table to mod_magnet for setting/getting environment values for cgi (fixes #1967, thx presbrey)
Add "lighty.req_env" table to mod_magnet for setting/getting environment values for cgi (fixes #1967, thx presbrey)
History
#1 Updated by stbuehler almost 4 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset r2515.
Also available in: Atom
