Commit e8bd1a0a authored by Yann Ylavic's avatar Yann Ylavic
Browse files

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
parent b5b72d66
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@

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.
+0 −8
Original line number Diff line number Diff line
@@ -118,14 +118,6 @@ RELEASE SHOWSTOPPERS:
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 ]
+2 −0
Original line number Diff line number Diff line
@@ -225,6 +225,8 @@ listfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>"
            "<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>
+3 −0
Original line number Diff line number Diff line
@@ -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;