From 24f392484d4afbda817805d46b7a3d0039c25d9e Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Wed, 10 Mar 2010 13:37:00 +0000 Subject: [PATCH] log remote server port in various places git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@921347 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy_http.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 0225b7a275..bad9259b65 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1399,7 +1399,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, if (len <= 0) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, "proxy: error reading status line from remote " - "server %s", backend->hostname); + "server %s:%d", backend->hostname, backend->port); if (rc == APR_TIMEUP) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "proxy: read timeout"); @@ -1421,9 +1421,9 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "proxy: Closing connection to client because" - " reading from backend server %s failed. Number" - " of keepalives %i", backend->hostname, - c->keepalives); + " reading from backend server %s:%d failed." + " Number of keepalives %i", backend->hostname, + backend->port, c->keepalives); ap_proxy_backend_broke(r, bb); /* * Add an EOC bucket to signal the ap_http_header_filter @@ -1454,8 +1454,9 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, else if (!c->keepalives) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "proxy: NOT Closing connection to client" - " although reading from backend server %s" - " failed.", backend->hostname); + " although reading from backend server %s:%d" + " failed.", backend->hostname, + backend->port); } return ap_proxyerror(r, HTTP_BAD_GATEWAY, "Error reading from remote server"); @@ -1560,8 +1561,9 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, */ apr_table_unset(r->headers_out, "Content-Length"); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "proxy: server %s returned Transfer-Encoding" - " and Content-Length", backend->hostname); + "proxy: server %s:%d returned Transfer-Encoding" + " and Content-Length", backend->hostname, + backend->port); backend->close += 1; } -- 2.40.0