From 0947797c18d74d278773de7d8cec1eb6df9abbcf Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Sun, 12 Jan 2020 12:56:12 +0000 Subject: [PATCH] proxy: add local address to body-forwarding errors Adds the local/ephemeral port for the backend connection git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1872673 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy_http.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index c635961644..c6d559d98f 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -674,8 +674,9 @@ static int ap_proxy_http_prefetch(proxy_http_req_t *req, } if (status != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01095) - "prefetch request body failed to %pI (%s)" + "prefetch request body failed to %pI<>%pI (%s)" " from %s (%s)", + p_conn->connection->local_addr, p_conn->addr, p_conn->hostname ? p_conn->hostname: "", c->client_ip, c->remote_host ? c->remote_host: ""); return ap_map_http_request_error(status, HTTP_BAD_REQUEST); @@ -883,7 +884,8 @@ static int ap_proxy_http_request(proxy_http_req_t *req) conn_rec *c = r->connection; /* apr_status_t value has been logged in lower level method */ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01097) - "pass request body failed to %pI (%s) from %s (%s)", + "pass request body failed to %pI<>%pI (%s) from %s (%s)", + req->origin->local_addr, req->backend->addr, req->backend->hostname ? req->backend->hostname: "", c->client_ip, c->remote_host ? c->remote_host: "");