diff options
author | Yann Ylavic <ylavic@apache.org> | 2021-09-09 18:55:24 +0200 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2021-09-09 18:55:24 +0200 |
commit | 2b7f51ade70bf6d517b94311dda5250e2dca85a7 (patch) | |
tree | 2a72ec52aa4cdbe0f8446c15553b877d47abc61d /server/log.c | |
parent | * optimizing hook check as suggested by Yann. (diff) | |
download | apache2-2b7f51ade70bf6d517b94311dda5250e2dca85a7.tar.xz apache2-2b7f51ade70bf6d517b94311dda5250e2dca85a7.zip |
core: Add ap_create_connection() to create a server or client/proxy connection.
c->outgoing shouldn't be set by mod_ssl, ap_create_connection() allows that
and this commit also replaces all the calls to ap_run_create_connection() in
mod_proxy modules (not in the MPMs which create incoming connections only).
* include/http_connection.h, server/connection.c:
Declare and implement ap_create_connection().
* modules/proxy/proxy_util.c, modules/proxy/mod_proxy_connect.c,
modules/proxy/mod_proxy_ftp.c:
Use ap_create_connection() instead of ap_run_create_connection(), and don't
provide a connection_id a scoreboard handle for outgoing connection.
* server/log.c(do_errorlog_default):
Use c->outgoing instead of c->sbh to determine if it's a "client" or "remote"
connection.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893184 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | server/log.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/log.c b/server/log.c index baa0b69043..89e1679fed 100644 --- a/server/log.c +++ b/server/log.c @@ -914,14 +914,14 @@ static int do_errorlog_default(const ap_errorlog_info *info, char *buf, * 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] ", + len += apr_snprintf(buf + len, buflen - len, "[%s %s:%d] ", + info->r->connection->outgoing ? "remote" : "client", info->r->useragent_ip, info->r->useragent_addr ? info->r->useragent_addr->port : 0); } else if (info->c) { - len += apr_snprintf(buf + len, buflen - len, - info->c->sbh ? "[client %s:%d] " : "[remote %s:%d] ", + len += apr_snprintf(buf + len, buflen - len, "[%s %s:%d] ", + info->c->outgoing ? "remote" : "client", info->c->client_ip, info->c->client_addr ? info->c->client_addr->port : 0); } |