Feature #1740
closedremoteip support for mod_magnet
Description
there is no way to getting remote client ip from mod_magnet so i added this small patch to mod_magnet.
using from lua is same as other env variables
lighty.envrequest.remoteip
--- lighttpd/src/mod_magnet.c 2008-08-01 16:31:00.000000000 0300
++ mod_magnet.c 2008-08-01 16:30:47.000000000 0300@ -392,6 +392,7
@
MAGNET_ENV_REQUEST_METHOD,
MAGNET_ENV_REQUEST_URI,
MAGNET_ENV_REQUEST_ORIG_URI,
MAGNET_ENV_REQUEST_REMOTEIP,
MAGNET_ENV_REQUEST_PROTOCOL
} type;
} magnet_env_t;@ -414,6 +415,7
@
{ "request.method", MAGNET_ENV_REQUEST_METHOD },
{ "request.uri", MAGNET_ENV_REQUEST_URI },
{ "request.orig-uri", MAGNET_ENV_REQUEST_ORIG_URI },
+ { "request.remoteip", MAGNET_ENV_REQUEST_REMOTEIP },
{ "request.protocol", MAGNET_ENV_REQUEST_PROTOCOL },
{ NULL, MAGNET_ENV_UNSET }
@ -447,6 +449,7
@
break;
case MAGNET_ENV_REQUEST_URI: dest = con->request.uri; break;
case MAGNET_ENV_REQUEST_ORIG_URI: dest = con->request.orig_uri; break;
+ case MAGNET_ENV_REQUEST_REMOTEIP: dest = con->dst_addr_buf; break;
case MAGNET_ENV_REQUEST_PROTOCOL:
buffer_copy_string(srv->tmp_buf, get_http_version_name(con->request.http_version));
dest = srv->tmp_buf;
-- Taylan Karaoglu
Files
Updated by indeyets almost 16 years ago
- Status changed from New to Patch Pending
- Assignee changed from jan to icy
- Target version changed from 1.5.0 to 1.4.22
- % Done changed from 0 to 100
this one is simple and has patch.
Updated by stbuehler almost 16 years ago
- Target version changed from 1.4.22 to 1.4.23
Updated by stbuehler over 15 years ago
- Status changed from Patch Pending to Fixed
Applied in changeset r2473.
Also available in: Atom