]> granicus.if.org Git - apache/commitdiff
Further clarify the naming of the entity that originates the request by
authorGraham Leggett <minfrin@apache.org>
Wed, 14 Dec 2011 00:33:46 +0000 (00:33 +0000)
committerGraham Leggett <minfrin@apache.org>
Wed, 14 Dec 2011 00:33:46 +0000 (00:33 +0000)
calling that entity a useragent instead of a client.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1214005 13f79535-47bb-0310-9956-ffa450edef68

server/log.c
server/protocol.c
server/request.c
server/util_expr_eval.c
server/util_script.c

index 70c37e0ae7f6553a0e19f1e44103204c204a57f7..bdcf427753f886ad7528354e4b213a56409e1318 100644 (file)
@@ -562,8 +562,8 @@ static int log_remote_address(const ap_errorlog_info *info, const char *arg,
                               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_errorlog_info *info, char *buf,
     }
 
     /*
-     * 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,
index 3014110a16429feeb96198a52dfb6b39aee9e4bb..b4b39902047636d5e17dce1cc8880e22c8cc2a0c 100644 (file)
@@ -976,8 +976,8 @@ request_rec *ap_read_request(conn_rec *conn)
      */
     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);
 
index dae87394bd599f9d4f6c37b11e793c4aec3f44cd..bb2a054de3b73c57ec730b5343326382c8c9fbd5 100644 (file)
@@ -1832,8 +1832,8 @@ static request_rec *make_sub_request(const request_rec *r,
         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 */
 
index 3f0460c91147989898d91c53fa814577493d0d62..b2dc9ab0c8598e05d601849afe94ebb5fa0907f2 100644 (file)
@@ -1344,7 +1344,7 @@ static const char *request_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
     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, const void *data, const char *arg1)
     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)
index 907dd3607992166142880848dea2e19b8bd583ea..2f181ecd5c5a21ae715761b2324a122845998b67 100644 (file)
@@ -235,7 +235,7 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
                   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));