]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Merge r1729930, r1729931 from trunk:
authorJim Jagielski <jim@apache.org>
Wed, 2 Mar 2016 13:22:07 +0000 (13:22 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 2 Mar 2016 13:22:07 +0000 (13:22 +0000)
commitf11b580e2e105a3facac81ffc81659fbaeaadddc
tree5f39dd1f838bf717b850df6442641c6ebd4d8850
parent4b9d1e6edb1cbf7579b006df76634b91655e2b40
Merge r1729930, r1729931 from trunk:

hostname: Test and log useragent_host per-request across various modules,
including the scoreboard, expression and rewrite engines, setenvif,
authz_host, access_compat, custom logging, ssl and REMOTE_HOST variables.
PR55348  [William Rowe]

This is the complete change set which applies cleanly to 2.4.x as well,
the server/scoreboard.c will follow, which does not apply due to drift.

A rather ugly patch since the code was refactored recently to exclude
the simple patch for 2.4.x, illustrated below.

Completes the changeset r1729930 and resolves all 2.4.19-dev corrections,
but other 2.5.0-dev specific changes may still be needed on trunk.

--- server/scoreboard.c (revision 1729907)
+++ server/scoreboard.c (working copy)
@@ -491,9 +491,8 @@
             ws->conn_bytes = 0;
         }
         if (r) {
-            const char *client = ap_get_remote_host(c, r->per_dir_config,
-                                 REMOTE_NOLOOKUP, NULL);
-            if (!client || !strcmp(client, c->client_ip)) {
+            const char *client;
+            if (!(client = ap_get_useragent_host(r, REMOTE_NOLOOKUP, NULL))) {
                 apr_cpystrn(ws->client, r->useragent_ip, sizeof(ws->client));
             }
             else {

Submitted by: wrowe
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1733282 13f79535-47bb-0310-9956-ffa450edef68
12 files changed:
CHANGES
STATUS
modules/aaa/mod_access_compat.c
modules/aaa/mod_authz_host.c
modules/arch/netware/mod_nw_ssl.c
modules/mappers/mod_rewrite.c
modules/metadata/mod_setenvif.c
modules/proxy/ajp_header.c
modules/ssl/ssl_engine_vars.c
server/scoreboard.c
server/util_expr_eval.c
server/util_script.c