Commit 8a2f9192 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1730129 from trunk:

Support %{c}h for conn-hostname, %h for useragent_host
Submitted by: wrowe
Reviewed by: jim, ylavic, covener
Merge r1818321 from trunk:

"{c}h" exists and logs the value returned by 'ap_get_useragent_host()'.

I'm not sure of the description to write there, so I just mention it in the doc and hope s.o. will find the words :)

This has been introduced in r1730129.
Submitted by: jailletc36
Reviewed by: jim, ylavic, covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1855818 13f79535-47bb-0310-9956-ffa450edef68
parent 1450721e
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
                                                         -*- coding: utf-8 -*-
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.4.39
Changes with Apache 2.4.39


  *) mod_log_config: Support %{c}h for conn-hostname, %h for useragent_host
     PR 55348

  *) mod_socache_redis: Support for Redis as socache storage provider.

  *) core: new configuration option 'MergeSlashes on|off' that controls handling of
  *) core: new configuration option 'MergeSlashes on|off' that controls handling of
     multiple, consecutive slash ('/') characters in the path component of the request URL.
     multiple, consecutive slash ('/') characters in the path component of the request URL.
     [Eric Covener]
     [Eric Covener]
+0 −6
Original line number Original line Diff line number Diff line
@@ -126,12 +126,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]
  [ start all new proposals below, under PATCHES PROPOSED. ]


  *) mod_log_config: Support %{c}h for conn-hostname, %h for useragent_host
     PR 55348
     trunk patch: https://svn.apache.org/r1730129
     2.4.x patch: svn merge -c 1730129 ^/httpd/httpd/trunk .
     +1: jim, ylavic, covener
     jailletc36: require r1818321 and part of r1818341 to update doc accordingly


PATCHES PROPOSED TO BACKPORT FROM TRUNK:
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
  [ New proposals should be added at the end of the list ]
  [ New proposals should be added at the end of the list ]
+5 −0
Original line number Original line Diff line number Diff line
@@ -111,6 +111,11 @@
        href="mod_authz_host.html#reqhost">the Require host
        href="mod_authz_host.html#reqhost">the Require host
        documentation</a>.</td></tr>
        documentation</a>.</td></tr>


    <tr><td><code>%{c}h</code></td>
        <td>Like <code>%h</code>, but always reports on the hostname of the
        underlying TCP connection and not any modifications to the 
        remote hostname by modules like <module>mod_remoteip</module>.</td></tr>

    <tr><td><code>%H</code></td>
    <tr><td><code>%H</code></td>
        <td>The request protocol.</td></tr>
        <td>The request protocol.</td></tr>


+9 −3
Original line number Original line Diff line number Diff line
@@ -309,9 +309,15 @@ static const char *constant_item(request_rec *dummy, char *stuff)


static const char *log_remote_host(request_rec *r, char *a)
static const char *log_remote_host(request_rec *r, char *a)
{
{
    return ap_escape_logitem(r->pool, ap_get_remote_host(r->connection,
    const char *remote_host;
                                                         r->per_dir_config,
    if (a && !strcmp(a, "c")) {
                                                         REMOTE_NAME, NULL));
        remote_host = ap_get_remote_host(r->connection, r->per_dir_config,
                                         REMOTE_NAME, NULL);
    }
    else {
        remote_host = ap_get_useragent_host(r, REMOTE_NAME, NULL);
    }
    return ap_escape_logitem(r->pool, remote_host);
}
}


static const char *log_remote_address(request_rec *r, char *a)
static const char *log_remote_address(request_rec *r, char *a)