httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1729930 - in /httpd/httpd/trunk: ./ modules/aaa/ modules/arch/netware/ modules/mappers/ modules/metadata/ modules/proxy/ modules/ssl/ server/
Date Fri, 12 Feb 2016 01:17:03 GMT
Author: wrowe
Date: Fri Feb 12 01:17:03 2016
New Revision: 1729930

URL: http://svn.apache.org/viewvc?rev=1729930&view=rev
Log:
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.


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/aaa/mod_access_compat.c
    httpd/httpd/trunk/modules/aaa/mod_authz_host.c
    httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c
    httpd/httpd/trunk/modules/mappers/mod_rewrite.c
    httpd/httpd/trunk/modules/metadata/mod_setenvif.c
    httpd/httpd/trunk/modules/proxy/ajp_header.c
    httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c
    httpd/httpd/trunk/server/util_expr_eval.c
    httpd/httpd/trunk/server/util_script.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1729930&r1=1729929&r2=1729930&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri Feb 12 01:17:03 2016
@@ -1,6 +1,11 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) 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]
+ 
   *) core: Track the useragent_host per-request when mod_remoteip or similar
      modules track a per-request useragent_ip.  Modules should be updated
      to inquire for ap_get_useragent_host() in place of ap_get_remote_host().

Modified: httpd/httpd/trunk/modules/aaa/mod_access_compat.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_access_compat.c?rev=1729930&r1=1729929&r2=1729930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_access_compat.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_access_compat.c Fri Feb 12 01:17:03 2016
@@ -279,10 +279,8 @@ static int find_allowdeny(request_rec *r
             if (!gothost) {
                 int remotehost_is_ip;
 
-                remotehost = ap_get_remote_host(r->connection,
-                                                r->per_dir_config,
-                                                REMOTE_DOUBLE_REV,
-                                                &remotehost_is_ip);
+                remotehost = ap_get_useragent_host(r, REMOTE_DOUBLE_REV,
+                                                   &remotehost_is_ip);
 
                 if ((remotehost == NULL) || remotehost_is_ip) {
                     gothost = 1;

Modified: httpd/httpd/trunk/modules/aaa/mod_authz_host.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authz_host.c?rev=1729930&r1=1729929&r2=1729930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authz_host.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authz_host.c Fri Feb 12 01:17:03 2016
@@ -169,10 +169,7 @@ static authz_status host_check_authoriza
     const char *remotehost = NULL;
     int remotehost_is_ip;
 
-    remotehost = ap_get_remote_host(r->connection,
-                                    r->per_dir_config,
-                                    REMOTE_DOUBLE_REV,
-                                    &remotehost_is_ip);
+    remotehost = ap_get_useragent_host(r, REMOTE_DOUBLE_REV, &remotehost_is_ip);
 
     if ((remotehost == NULL) || remotehost_is_ip) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01753)

Modified: httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c?rev=1729930&r1=1729929&r2=1729930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c (original)
+++ httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c Fri Feb 12 01:17:03 2016
@@ -1020,8 +1020,7 @@ char *ssl_var_lookup(apr_pool_t *p, serv
             else if (strcEQ(var, "REMOTE_ADDR"))
                 result = r->useragent_ip;
             else if (strcEQ(var, "REMOTE_HOST"))
-                result = ap_get_remote_host(r->connection, r->per_dir_config,
-                                            REMOTE_NAME, NULL);
+                result = ap_get_useragent_host(r, REMOTE_NAME, NULL);
             else if (strcEQ(var, "REMOTE_IDENT"))
                 result = ap_get_remote_logname(r);
             else if (strcEQ(var, "REMOTE_USER"))

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=1729930&r1=1729929&r2=1729930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Fri Feb 12 01:17:03 2016
@@ -451,8 +451,7 @@ static void do_rewritelog(request_rec *r
     if (!APLOG_R_IS_LEVEL(r, APLOG_DEBUG + level))
         return;
 
-    rhost = ap_get_remote_host(r->connection, r->per_dir_config,
-                               REMOTE_NOLOOKUP, NULL);
+    rhost = ap_get_useragent_host(r, REMOTE_NOLOOKUP, NULL);
     rname = ap_get_remote_logname(r);
 
     for (redir=0, req=r; req->prev; req = req->prev) {

Modified: httpd/httpd/trunk/modules/metadata/mod_setenvif.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_setenvif.c?rev=1729930&r1=1729929&r2=1729930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_setenvif.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_setenvif.c Fri Feb 12 01:17:03 2016
@@ -531,8 +531,7 @@ static int match_headers(request_rec *r)
                     val = r->connection->local_ip;
                     break;
                 case SPECIAL_REMOTE_HOST:
-                    val =  ap_get_remote_host(r->connection, r->per_dir_config,
-                                              REMOTE_NAME, NULL);
+                    val = ap_get_useragent_host(r, REMOTE_NAME, NULL);
                     break;
                 case SPECIAL_REQUEST_URI:
                     val = r->uri;

Modified: httpd/httpd/trunk/modules/proxy/ajp_header.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/ajp_header.c?rev=1729930&r1=1729929&r2=1729930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/ajp_header.c (original)
+++ httpd/httpd/trunk/modules/proxy/ajp_header.c Fri Feb 12 01:17:03 2016
@@ -239,7 +239,7 @@ static apr_status_t ajp_marshal_into_msg
         num_headers = t->nelts;
     }
 
-    remote_host = (char *)ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_HOST,
NULL);
+    remote_host = (char *)ap_get_useragent_host(r, REMOTE_HOST, NULL);
 
     ajp_msg_reset(msg);
 

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c?rev=1729930&r1=1729929&r2=1729930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c Fri Feb 12 01:17:03 2016
@@ -295,8 +295,7 @@ char *ssl_var_lookup(apr_pool_t *p, serv
             else if (strcEQ(var, "REMOTE_ADDR"))
                 result = r->useragent_ip;
             else if (strcEQ(var, "REMOTE_HOST"))
-                result = ap_get_remote_host(r->connection, r->per_dir_config,
-                                            REMOTE_NAME, NULL);
+                result = ap_get_useragent_host(r, REMOTE_NAME, NULL);
             else if (strcEQ(var, "REMOTE_IDENT"))
                 result = ap_get_remote_logname(r);
             else if (strcEQ(var, "REMOTE_USER"))

Modified: httpd/httpd/trunk/server/util_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_eval.c?rev=1729930&r1=1729929&r2=1729930&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_eval.c (original)
+++ httpd/httpd/trunk/server/util_expr_eval.c Fri Feb 12 01:17:03 2016
@@ -1476,8 +1476,7 @@ static const char *request_var_fn(ap_exp
     case 3:
         return r->filename;
     case 4:
-        return ap_get_remote_host(r->connection, r->per_dir_config,
-                                  REMOTE_NAME, NULL);
+        return ap_get_useragent_host(r, REMOTE_NAME, NULL);
     case 5:
         return ap_get_remote_logname(r);
     case 6:

Modified: httpd/httpd/trunk/server/util_script.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_script.c?rev=1729930&r1=1729929&r2=1729930&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_script.c (original)
+++ httpd/httpd/trunk/server/util_script.c Fri Feb 12 01:17:03 2016
@@ -244,7 +244,7 @@ AP_DECLARE(void) ap_add_common_vars(requ
     apr_table_addn(e, "SERVER_PORT",
                   apr_psprintf(r->pool, "%u", ap_get_server_port(r)));
     add_unless_null(e, "REMOTE_HOST",
-                    ap_get_remote_host(c, r->per_dir_config, REMOTE_HOST, NULL));
+                    ap_get_useragent_host(r, REMOTE_HOST, NULL));
     apr_table_addn(e, "REMOTE_ADDR", r->useragent_ip);
     apr_table_addn(e, "DOCUMENT_ROOT", ap_document_root(r));    /* Apache */
     apr_table_setn(e, "REQUEST_SCHEME", ap_http_scheme(r));



Mime
View raw message