]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Follow up to r1918022: MMN minor bump and checks for the new conn_state_e aliases...
authorYann Ylavic <ylavic@apache.org>
Wed, 29 May 2024 09:41:25 +0000 (09:41 +0000)
committerYann Ylavic <ylavic@apache.org>
Wed, 29 May 2024 09:41:25 +0000 (09:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918035 13f79535-47bb-0310-9956-ffa450edef68

include/ap_mmn.h
modules/http2/h2.h
modules/http2/h2_c1.c
modules/http2/h2_session.c

index 9d79c14e95d6c652e71b2cb3af427a3d281200de..06c04bd50ec949d1e647adcb254b2a9cbc297b3c 100644 (file)
  * 20211221.17 (2.5.1-dev) Add ap_proxy_worker_get_name()
  * 20211221.18 (2.5.1-dev) Add ap_regexec_ex()
  * 20211221.19 (2.5.1-dev) Add AP_REG_NOTEMPTY_ATSTART
+ * 20211221.20 (2.5.1-dev) Add CONN_STATE_KEEPALIVE and CONN_STATE_PROCESS
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
 #define MODULE_MAGIC_NUMBER_MAJOR 20211221
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 19             /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 20             /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
index f496a6dcb2bd1bf21b21935978627606d2160328..0ca72238a4d71297eebd595515ba3c87fee624dc 100644 (file)
@@ -49,6 +49,12 @@ struct h2_stream;
 #define H2_USE_WEBSOCKETS       0
 #endif
 
+#if AP_MODULE_MAGIC_AT_LEAST(20211221, 20)
+#define H2_USE_STATE_PROCESS       1
+#else
+#define H2_USE_STATE_PROCESS       0
+#endif
+
 /**
  * The magic PRIamble of RFC 7540 that is always sent when starting
  * a h2 communication.
index 0a3e8395addadca51eba62a427ea8170a031a336..6ba6dffb1b2904d6c45d7a4e00a1b8cabb372a12 100644 (file)
@@ -161,7 +161,11 @@ apr_status_t h2_c1_run(conn_rec *c)
                      * the Timeout behaviour instead of a KeepAliveTimeout
                      * See PR 63534. 
                      */
+#if H2_USE_STATE_PROCESS
                     c->cs->state = CONN_STATE_PROCESS;
+#else
+                    c->cs->state = CONN_STATE_WRITE_COMPLETION;
+#endif
                     c->cs->sense = CONN_SENSE_WANT_READ;
                 }
                 break;
index 25001730a70e8e9dba11b1103b3ca328f5472f0d..e5809d59ac51309fd5809defca968a0d86627707 100644 (file)
@@ -1762,6 +1762,7 @@ static void unblock_c1_out(h2_session *session) {
     }
 }
 
+#if H2_USE_STATE_PROCESS
 static int h2_send_flow_blocked(h2_session *session)
 {
     /* We are completely send blocked if either the connection window
@@ -1769,6 +1770,7 @@ static int h2_send_flow_blocked(h2_session *session)
     return ((nghttp2_session_get_remote_window_size(session->ngh2) <= 0) ||
              h2_mplx_c1_all_streams_send_win_exhausted(session->mplx));
 }
+#endif
 
 apr_status_t h2_session_process(h2_session *session, int async,
                                 int *pkeepalive)
@@ -1952,7 +1954,7 @@ apr_status_t h2_session_process(h2_session *session, int async,
                     break;
                 }
             }
-#if AP_MODULE_MAGIC_AT_LEAST(20211221, 19)
+#if H2_USE_STATE_PROCESS
             else if (async && h2_send_flow_blocked(session)) {
                 /* On a recent HTTPD, we can return to mpm c1 monitoring,
                  * as it does not treat all connections as having KeepAlive