mod_magnet: Add env["request.remote-ip"] (fixes #1740)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2473 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
parent
3172b49840
commit
1ff333cb4a
1
NEWS
1
NEWS
|
@ -22,6 +22,7 @@ NEWS
|
|||
* Add revision number to package version for svn/git checkouts
|
||||
* Use server.tag for SERVER_SOFTWARE if configured (fixes #357)
|
||||
* Fix trailing zero char in REQUEST_URI after "strip-request-uri" in mod_fastcgi
|
||||
* mod_magnet: Add env["request.remote-ip"] (fixes #1740)
|
||||
|
||||
- 1.4.22 - 2009-03-07
|
||||
* Fix wrong lua type for CACHE_MISS/CACHE_HIT in mod_cml (fixes #533)
|
||||
|
|
|
@ -365,6 +365,7 @@ typedef struct {
|
|||
MAGNET_ENV_REQUEST_METHOD,
|
||||
MAGNET_ENV_REQUEST_URI,
|
||||
MAGNET_ENV_REQUEST_ORIG_URI,
|
||||
MAGNET_ENV_REQUEST_REMOTE_IP,
|
||||
MAGNET_ENV_REQUEST_PROTOCOL
|
||||
} type;
|
||||
} magnet_env_t;
|
||||
|
@ -387,6 +388,7 @@ static buffer *magnet_env_get_buffer(server *srv, connection *con, const char *k
|
|||
{ "request.method", MAGNET_ENV_REQUEST_METHOD },
|
||||
{ "request.uri", MAGNET_ENV_REQUEST_URI },
|
||||
{ "request.orig-uri", MAGNET_ENV_REQUEST_ORIG_URI },
|
||||
{ "request.remote-ip", MAGNET_ENV_REQUEST_REMOTE_IP },
|
||||
{ "request.protocol", MAGNET_ENV_REQUEST_PROTOCOL },
|
||||
|
||||
{ NULL, MAGNET_ENV_UNSET }
|
||||
|
@ -420,6 +422,7 @@ static buffer *magnet_env_get_buffer(server *srv, connection *con, const char *k
|
|||
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_REMOTE_IP: 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;
|
||||
|
|
Loading…
Reference in New Issue