From 080d8e84f16038f8d90a9abee3b6f472c18ba5e8 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Sun, 2 Mar 2014 20:16:52 +0000 Subject: [PATCH] Merge r1570598 from trunk: Log an error in mod_proxy_http when reading the request body fails. Follow-up to r1538776 where incomplete bodies are detected and an error returned through the input filters. Submitted by: ylavic Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1573356 13f79535-47bb-0310-9956-ffa450edef68 --- STATUS | 5 ----- modules/proxy/mod_proxy_http.c | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/STATUS b/STATUS index 7372c76008..d9d6e344e5 100644 --- a/STATUS +++ b/STATUS @@ -98,11 +98,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_proxy_http: Log an error when reading the request body fails. - trunk patch: http://svn.apache.org/r1570598 - 2.4.x patch: trunk works modulo next_number - +1: ylavic, jim, mrumph - * mod_proxy_http: Don't recycle backend connections known to be closed. trunk patch: http://svn.apache.org/r1568404 2.4.x patch: trunk works diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index a1bbc450a1..e585a297ee 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -318,6 +318,12 @@ static int stream_reqbody_chunked(apr_pool_t *p, HUGE_STRING_LEN); if (status != APR_SUCCESS) { + conn_rec *c = r->connection; + ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02608) + "read request body failed to %pI (%s)" + " from %s (%s)", p_conn->addr, + p_conn->hostname ? p_conn->hostname: "", + c->client_ip, c->remote_host ? c->remote_host: ""); return HTTP_BAD_REQUEST; } } @@ -463,6 +469,12 @@ static int stream_reqbody_cl(apr_pool_t *p, HUGE_STRING_LEN); if (status != APR_SUCCESS) { + conn_rec *c = r->connection; + ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02609) + "read request body failed to %pI (%s)" + " from %s (%s)", p_conn->addr, + p_conn->hostname ? p_conn->hostname: "", + c->client_ip, c->remote_host ? c->remote_host: ""); return HTTP_BAD_REQUEST; } } @@ -606,6 +618,12 @@ static int spool_reqbody_cl(apr_pool_t *p, HUGE_STRING_LEN); if (status != APR_SUCCESS) { + conn_rec *c = r->connection; + ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02610) + "read request body failed to %pI (%s)" + " from %s (%s)", p_conn->addr, + p_conn->hostname ? p_conn->hostname: "", + c->client_ip, c->remote_host ? c->remote_host: ""); return HTTP_BAD_REQUEST; } } -- 2.50.1