From: Yann Ylavic Date: Fri, 21 Feb 2014 15:08:32 +0000 (+0000) Subject: Log an error in mod_proxy_http when reading the request body fails. X-Git-Tag: 2.5.0-alpha~4470 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=accfcf747101ff3223366acb7e8e6b61b51411f1;p=apache 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1570598 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index e7877a84b7..27149576c2 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -2608 +2611 diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index bb4a2a591f..cb81ddd0af 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; } }