]> granicus.if.org Git - apache/commitdiff
mpm_event: follow up to r1823047: complete state validation after processing.
authorYann Ylavic <ylavic@apache.org>
Fri, 16 Feb 2018 13:04:43 +0000 (13:04 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 16 Feb 2018 13:04:43 +0000 (13:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1824464 13f79535-47bb-0310-9956-ffa450edef68

include/httpd.h
server/mpm/event/event.c

index 4e42f8b347029f91f4ab7f6c034877a834a8fd5f..d6a4bae22c3b4a70fb055d98941cd911957f285f 100644 (file)
@@ -1248,7 +1248,9 @@ typedef enum  {
     CONN_STATE_SUSPENDED,
     CONN_STATE_LINGER,          /* connection may be closed with lingering */
     CONN_STATE_LINGER_NORMAL,   /* MPM has started lingering close with normal timeout */
-    CONN_STATE_LINGER_SHORT     /* MPM has started lingering close with short timeout */
+    CONN_STATE_LINGER_SHORT,    /* MPM has started lingering close with short timeout */
+
+    CONN_STATE_NUM              /* Number of states (keep/kept last) */
 } conn_state_e;
 
 typedef enum  {
index a58a552ce7d9ecf6991631ffa7f0cce48c2a08cd..84b2aa0501eb8d0ee9f4a809c88b4ff8ab33e679 100644 (file)
@@ -1123,7 +1123,8 @@ read_request:
      * while this was expected to do lingering close unconditionally with
      * worker or prefork MPMs for instance.
      */
-    if (rc != OK || (cs->pub.state < CONN_STATE_LINGER
+    if (rc != OK || (cs->pub.state >= CONN_STATE_NUM)
+                 || (cs->pub.state < CONN_STATE_LINGER
                      && cs->pub.state != CONN_STATE_WRITE_COMPLETION
                      && cs->pub.state != CONN_STATE_CHECK_REQUEST_LINE_READABLE
                      && cs->pub.state != CONN_STATE_SUSPENDED)) {