httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1214005 - in /httpd/httpd/trunk/server: log.c protocol.c request.c util_expr_eval.c util_script.c
Date Wed, 14 Dec 2011 00:33:47 GMT
Author: minfrin
Date: Wed Dec 14 00:33:46 2011
New Revision: 1214005

URL: http://svn.apache.org/viewvc?rev=1214005&view=rev
Log:
Further clarify the naming of the entity that originates the request by
calling that entity a useragent instead of a client.

Modified:
    httpd/httpd/trunk/server/log.c
    httpd/httpd/trunk/server/protocol.c
    httpd/httpd/trunk/server/request.c
    httpd/httpd/trunk/server/util_expr_eval.c
    httpd/httpd/trunk/server/util_script.c

Modified: httpd/httpd/trunk/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/log.c?rev=1214005&r1=1214004&r2=1214005&view=diff
==============================================================================
--- httpd/httpd/trunk/server/log.c (original)
+++ httpd/httpd/trunk/server/log.c Wed Dec 14 00:33:46 2011
@@ -562,8 +562,8 @@ static int log_remote_address(const ap_e
                               char *buf, int buflen)
 {
     if (info->r && !(arg && *arg == 'c'))
-        return apr_snprintf(buf, buflen, "%s:%d", info->r->client_ip,
-                            info->r->client_addr->port);
+        return apr_snprintf(buf, buflen, "%s:%d", info->r->useragent_ip,
+                            info->r->useragent_addr->port);
     else if (info->c)
         return apr_snprintf(buf, buflen, "%s:%d", info->c->peer_ip,
                             info->c->peer_addr->port);
@@ -962,13 +962,13 @@ static int do_errorlog_default(const ap_
     }
 
     /*
-     * client_ip/peer_ip can be client or backend server. If we have a scoreboard
-     * handle, it is likely a client.
+     * useragent_ip/peer_ip can be client or backend server. If we have
+     * a scoreboard handle, it is likely a client.
      */
     if (info->r) {
         len += apr_snprintf(buf + len, buflen - len,
                             info->r->connection->sbh ? "[client %s:%d] " : "[remote
%s:%d] ",
-                            info->r->client_ip, info->r->client_addr->port);
+                            info->r->useragent_ip, info->r->useragent_addr->port);
     }
     else if (info->c) {
         len += apr_snprintf(buf + len, buflen - len,

Modified: httpd/httpd/trunk/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/protocol.c?rev=1214005&r1=1214004&r2=1214005&view=diff
==============================================================================
--- httpd/httpd/trunk/server/protocol.c (original)
+++ httpd/httpd/trunk/server/protocol.c Wed Dec 14 00:33:46 2011
@@ -976,8 +976,8 @@ request_rec *ap_read_request(conn_rec *c
      */
     r->used_path_info = AP_REQ_DEFAULT_PATH_INFO;
 
-    r->client_addr = conn->peer_addr;
-    r->client_ip = conn->peer_ip;
+    r->useragent_addr = conn->peer_addr;
+    r->useragent_ip = conn->peer_ip;
 
     tmp_bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
 

Modified: httpd/httpd/trunk/server/request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/request.c?rev=1214005&r1=1214004&r2=1214005&view=diff
==============================================================================
--- httpd/httpd/trunk/server/request.c (original)
+++ httpd/httpd/trunk/server/request.c Wed Dec 14 00:33:46 2011
@@ -1832,8 +1832,8 @@ static request_rec *make_sub_request(con
         rnew->output_filters = r->proto_output_filters;
     }
 
-    rnew->client_addr = r->client_addr;
-    rnew->client_ip = r->client_ip;
+    rnew->useragent_addr = r->useragent_addr;
+    rnew->useragent_ip = r->useragent_ip;
 
     /* no input filters for a subrequest */
 

Modified: httpd/httpd/trunk/server/util_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_eval.c?rev=1214005&r1=1214004&r2=1214005&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_eval.c (original)
+++ httpd/httpd/trunk/server/util_expr_eval.c Wed Dec 14 00:33:46 2011
@@ -1344,7 +1344,7 @@ static const char *request_var_fn(ap_exp
     case 27:
         return r->status ? apr_psprintf(ctx->p, "%d", r->status) : "";
     case 28:
-        return r->client_ip;
+        return r->useragent_ip;
     default:
         ap_assert(0);
         return NULL;
@@ -1493,7 +1493,7 @@ static int op_R(ap_expr_eval_ctx_t *ctx,
     if (!ctx->r)
         return FALSE;
 
-    return apr_ipsubnet_test(subnet, ctx->r->client_addr);
+    return apr_ipsubnet_test(subnet, ctx->r->useragent_addr);
 }
 
 static int op_T(ap_expr_eval_ctx_t *ctx, const void *data, const char *arg)

Modified: httpd/httpd/trunk/server/util_script.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_script.c?rev=1214005&r1=1214004&r2=1214005&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_script.c (original)
+++ httpd/httpd/trunk/server/util_script.c Wed Dec 14 00:33:46 2011
@@ -235,7 +235,7 @@ AP_DECLARE(void) ap_add_common_vars(requ
                   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));
-    apr_table_addn(e, "REMOTE_ADDR", r->client_ip);
+    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));
     apr_table_addn(e, "CONTEXT_PREFIX", ap_context_prefix(r));



Mime
View raw message