]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1730129 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 19 Mar 2019 12:31:23 +0000 (12:31 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 19 Mar 2019 12:31:23 +0000 (12:31 +0000)
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

CHANGES
STATUS
docs/manual/mod/mod_log_config.xml
modules/loggers/mod_log_config.c

diff --git a/CHANGES b/CHANGES
index f46505816334904b6bc3e49b2179851ec0971c77..6b03eadfa07232fd6f8e09d7cf57bc75af1d1af0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,11 @@
                                                          -*- coding: utf-8 -*-
 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
      multiple, consecutive slash ('/') characters in the path component of the request URL.
      [Eric Covener]
diff --git a/STATUS b/STATUS
index 03a774ae04ec76e60c754d0efd37cffaad30c6ca..e4b278aab2548d945dd223734450b4b87bd05500 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -126,12 +126,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ 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:
   [ New proposals should be added at the end of the list ]
index c7b3543ff6d9d0e175a386a090d618c6a63e2fa3..6b8419334b3b25563416b01d3b15769cb23d5197 100644 (file)
         href="mod_authz_host.html#reqhost">the Require host
         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>
         <td>The request protocol.</td></tr>
 
index 4270b3f241125a14f26aa52f29110cdfb3787296..609de65a4d6f98911a9e2c49e38b043487d9388c 100644 (file)
@@ -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)
 {
-    return ap_escape_logitem(r->pool, ap_get_remote_host(r->connection,
-                                                         r->per_dir_config,
-                                                         REMOTE_NAME, NULL));
+    const char *remote_host;
+    if (a && !strcmp(a, "c")) {
+        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)