You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2018/02/16 13:04:43 UTC
svn commit: r1824464 - in /httpd/httpd/trunk: include/httpd.h
server/mpm/event/event.c
Author: ylavic
Date: Fri Feb 16 13:04:43 2018
New Revision: 1824464
URL: http://svn.apache.org/viewvc?rev=1824464&view=rev
Log:
mpm_event: follow up to r1823047: complete state validation after processing.
Modified:
httpd/httpd/trunk/include/httpd.h
httpd/httpd/trunk/server/mpm/event/event.c
Modified: httpd/httpd/trunk/include/httpd.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?rev=1824464&r1=1824463&r2=1824464&view=diff
==============================================================================
--- httpd/httpd/trunk/include/httpd.h (original)
+++ httpd/httpd/trunk/include/httpd.h Fri Feb 16 13:04:43 2018
@@ -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 {
Modified: httpd/httpd/trunk/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1824464&r1=1824463&r2=1824464&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Fri Feb 16 13:04:43 2018
@@ -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)) {