mirror of
https://github.com/apache/httpd.git
synced 2025-08-06 11:06:17 +00:00
PR59938: add %{REMOTE_PORT} to the expression parser
Submitted By: Hank Ibell <hwibell gmail.com> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1776459 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -1456,6 +1456,7 @@ static const char *request_var_names[] = {
|
||||
"SERVER_PROTOCOL_VERSION", /* 29 */
|
||||
"SERVER_PROTOCOL_VERSION_MAJOR", /* 30 */
|
||||
"SERVER_PROTOCOL_VERSION_MINOR", /* 31 */
|
||||
"REMOTE_PORT", /* 32 */
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -1562,6 +1563,8 @@ static const char *request_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
|
||||
case 9: return "9";
|
||||
}
|
||||
return apr_psprintf(ctx->p, "%d", HTTP_VERSION_MINOR(r->proto_num));
|
||||
case 32:
|
||||
return apr_psprintf(ctx->p, "%u", ctx->c->client_addr->port);
|
||||
default:
|
||||
ap_assert(0);
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user