]> granicus.if.org Git - apache/commitdiff
Log an error in mod_proxy_http when reading the request body fails.
authorYann Ylavic <ylavic@apache.org>
Fri, 21 Feb 2014 15:08:32 +0000 (15:08 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 21 Feb 2014 15:08:32 +0000 (15:08 +0000)
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

docs/log-message-tags/next-number
modules/proxy/mod_proxy_http.c

index e7877a84b703c63b3005ed8dc508b745309ab71e..27149576c254b367b0ca1327e4aa3a9ad9ee849a 100644 (file)
@@ -1 +1 @@
-2608
+2611
index bb4a2a591fab6bd9065841eac23205e76343e0ad..cb81ddd0af765e6540fa9458625a7f90033e031f 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;
         }
     }