On the trunk:
authorStefan Eissing <icing@apache.org>
Fri, 5 May 2017 13:03:41 +0000 (13:03 +0000)
committerStefan Eissing <icing@apache.org>
Fri, 5 May 2017 13:03:41 +0000 (13:03 +0000)
mod_http2: fail requests without ERROR log in case we need to read interim
     responses and see only garbage. This can happen if proxied servers send
     data where none should be, e.g. a body for a HEAD request.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1794049 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http2/h2_from_h1.c

diff --git a/CHANGES b/CHANGES
index 687cf65e6b6cc28487272a72f1348cf7111278f9..e6b5dcace9f2fde2a6b9532d10c4772adbdf7de5 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_http2: fail requests without ERROR log in case we need to read interim
+     responses and see only garbage. This can happen if proxied servers send
+     data where none should be, e.g. a body for a HEAD request. [Stefan Eissing]
+     
   *) Evaluate nested If/ElseIf/Else configuration blocks.
      [Luca Toscano, Jacob Champion]
 
index a8f50987f34f130ce26a0f0039a3fbec33af4c1a..56f051ef8ce6f3d2f4dbb51344657e81a694e810 100644 (file)
@@ -449,7 +449,14 @@ static apr_status_t parse_status(h2_task *task, char *line)
         
         return APR_SUCCESS;
     }
-    ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, task->c, APLOGNO(03467)
+    /* Seems like there is garbage on the connection. May be a leftover
+     * from a previous proxy request. 
+     * This should only happen if the H2_RESPONSE filter is not yet in 
+     * place (post_read_request has not been reached and the handler wants
+     * to write something. Probably just the interim response we are
+     * waiting for. But if there is other data hanging around before
+     * that, this needs to fail. */
+    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, task->c, APLOGNO(03467)
                   "h2_task(%s): unable to parse status line: %s", 
                   task->id, line);
     return APR_EINVAL;