]> granicus.if.org Git - apache/commitdiff
Merge r1570598 from trunk:
authorJim Jagielski <jim@apache.org>
Sun, 2 Mar 2014 20:16:52 +0000 (20:16 +0000)
committerJim Jagielski <jim@apache.org>
Sun, 2 Mar 2014 20:16:52 +0000 (20:16 +0000)
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
modules/proxy/mod_proxy_http.c

diff --git a/STATUS b/STATUS
index 7372c76008bbc1cda0822c99e9c38c08705b3eba..d9d6e344e5862ada226807a4cb8ed050098608d3 100644 (file)
--- 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
index a1bbc450a1956ea87bd4aa75c9e7d6153bfb9233..e585a297ee39f45b88de5bb5b518c762087dbc2c 100644 (file)
@@ -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;
         }
     }