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
Changes with Apache 2.4.26
+ *) core: Add %{REMOTE_PORT} to the expression parser. PR59938
+ [Hank Ibell <hwibell gmail.com>]
+
*) mod_cache: Fix a regression in 2.4.25 for the forward proxy case by
computing and using the same entity key according to when the cache
checks, loads and saves the request.
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) core: Add %{REMOTE_PORT} to the expression parser. PR59938
- trunk patch: http://svn.apache.org/r1776459
- http://svn.apache.org/r1788508
- 2.4.x patch: trunk works
- +1: covener, ylavic, jchampion
- jchampion: Trunk patches don't apply cleanly for me. The patch I used to
- test is at https://home.apache.org/~jchampion/patches/2.4.x-expr-REMOTE_PORT.patch
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
"<code>GET /index.html HTTP/1.1</code>")</td></tr>
<tr><td><code>REMOTE_ADDR</code></td>
<td>The IP address of the remote host</td></tr>
+ <tr><td><code>REMOTE_PORT</code></td>
+ <td>The port of the remote host (2.4.26 and later)</td></tr>
<tr><td><code>REMOTE_HOST</code></td>
<td>The host name of the remote host</td></tr>
<tr><td><code>REMOTE_USER</code></td>
"CONTEXT_DOCUMENT_ROOT", /* 26 */
"REQUEST_STATUS", /* 27 */
"REMOTE_ADDR", /* 28 */
+ "REMOTE_PORT", /* 29 */
NULL
};
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;