Browse Source

mod_magnet: Add env["request.path-info"]

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2474 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.23
Stefan Bühler 13 years ago
parent
commit
c21623456c
  1. 1
      NEWS
  2. 3
      src/mod_magnet.c

1
NEWS

@ -23,6 +23,7 @@ NEWS
* 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)
* mod_magnet: Add env["request.path-info"]
- 1.4.22 - 2009-03-07
* Fix wrong lua type for CACHE_MISS/CACHE_HIT in mod_cml (fixes #533)

3
src/mod_magnet.c

@ -365,6 +365,7 @@ typedef struct {
MAGNET_ENV_REQUEST_METHOD,
MAGNET_ENV_REQUEST_URI,
MAGNET_ENV_REQUEST_ORIG_URI,
MAGNET_ENV_REQUEST_PATH_INFO,
MAGNET_ENV_REQUEST_REMOTE_IP,
MAGNET_ENV_REQUEST_PROTOCOL
} type;
@ -388,6 +389,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.path-info", MAGNET_ENV_REQUEST_PATH_INFO },
{ "request.remote-ip", MAGNET_ENV_REQUEST_REMOTE_IP },
{ "request.protocol", MAGNET_ENV_REQUEST_PROTOCOL },
@ -422,6 +424,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_PATH_INFO: dest = con->request.pathinfo; 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));

Loading…
Cancel
Save