summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2017-03-28 21:30:09 +0000
committerYann Ylavic <ylavic@apache.org>2017-03-28 21:30:09 +0000
commit2ad19e9839573e1aef3e9df80dcfdfe63e117f77 (patch)
tree36e86f89420ba3ded0c2cbc82b9636d91379470d /server
parentd6476b564808a382d3e7e83dbf89b693c162b60e (diff)
downloadhttpd-2ad19e9839573e1aef3e9df80dcfdfe63e117f77.tar.gz
Merge r1776459, r1788508 from trunk:
PR59938: add %{REMOTE_PORT} to the expression parser Submitted By: Hank Ibell <hwibell gmail.com> compat note for REMOTE_PORT Submitted by: covener Reviewed by: covener, ylavic, jchampion git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1789244 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/util_expr_eval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c
index 6659ea62a2..b1cb9235d1 100644
--- a/server/util_expr_eval.c
+++ b/server/util_expr_eval.c
@@ -1337,6 +1337,7 @@ static const char *request_var_names[] = {
"CONTEXT_DOCUMENT_ROOT", /* 26 */
"REQUEST_STATUS", /* 27 */
"REMOTE_ADDR", /* 28 */
+ "REMOTE_PORT", /* 29 */
NULL
};
@@ -1426,6 +1427,8 @@ static const char *request_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
return r->status ? apr_psprintf(ctx->p, "%d", r->status) : "";
case 28:
return r->useragent_ip;
+ case 29:
+ return apr_psprintf(ctx->p, "%u", ctx->c->client_addr->port);
default:
ap_assert(0);
return NULL;