]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
*) mod_http2/mpm_event: Fixes the behaviour when a HTTP/2 connection has nothing
authorStefan Eissing <icing@apache.org>
Wed, 3 Jul 2019 13:46:31 +0000 (13:46 +0000)
committerStefan Eissing <icing@apache.org>
Wed, 3 Jul 2019 13:46:31 +0000 (13:46 +0000)
     more to write with streams ongoing (flow control block). The timeout waiting
     for the client to send WINODW_UPDATE was incorrectly KeepAliveTimeout and not
     Timeout as it should be. Fixes PR 63534. [Yann Ylavic, Stefan Eissing]

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

CHANGES
modules/http2/h2_conn.c
modules/http2/h2_version.h
server/mpm/event/event.c

diff --git a/CHANGES b/CHANGES
index eab4237a2bf91a4b89d1d4814df587025995a3b5..35fd06ac7e7cdf042a042d90d8e87af4f185ec49 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,11 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) mod_http2/mpm_event: Fixes the behaviour when a HTTP/2 connection has nothing
+     more to write with streams ongoing (flow control block). The timeout waiting
+     for the client to send WINODW_UPDATE was incorrectly KeepAliveTimeout and not
+     Timeout as it should be. Fixes PR 63534. [Yann Ylavic, Stefan Eissing]
+
   *) mod_ssl/mod_md: reversing dependency by letting mod_ssl offer hooks for
      adding certificates and keys to a virtual host. An additional hook allows
      answering special TLS connections as used in ACME challenges.
index d29cd7e996b8c7918ed3fb6e408aaa92234ec0ee..796bea8f3ccc7162dc6addca7f9d983b150af33f 100644 (file)
@@ -231,6 +231,13 @@ apr_status_t h2_conn_run(conn_rec *c)
             case H2_SESSION_ST_BUSY:
             case H2_SESSION_ST_WAIT:
                 c->cs->state = CONN_STATE_WRITE_COMPLETION;
+                if (c->cs && (session->open_streams || !session->remote.emitted_count)) {
+                    /* let the MPM know that we are not done and want
+                     * the Timeout behaviour instead of a KeepAliveTimeout
+                     * See PR 63534. 
+                     */
+                    c->cs->sense = CONN_SENSE_WANT_READ;
+                }
                 break;
             case H2_SESSION_ST_CLEANUP:
             case H2_SESSION_ST_DONE:
index a26bdd89235bdc88bd36e09b3525dce5e26b3c74..e5a9dca3fd4dc43ff261076f62271e6bfde76b7b 100644 (file)
@@ -27,7 +27,7 @@
  * @macro
  * Version number of the http2 module as c string
  */
-#define MOD_HTTP2_VERSION "1.15.2"
+#define MOD_HTTP2_VERSION "1.15.3"
 
 /**
  * @macro
@@ -35,7 +35,7 @@
  * release. This is a 24 bit number with 8 bits for major number, 8 bits
  * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
  */
-#define MOD_HTTP2_VERSION_NUM 0x010f02
+#define MOD_HTTP2_VERSION_NUM 0x010f03
 
 
 #endif /* mod_h2_h2_version_h */
index 4bb2d5bd0fd09e57d5c4bf0f4af3e7301bd06a99..f9cc820b95af39d34ce38f4e089b8cb619496a83 100644 (file)
@@ -1153,10 +1153,11 @@ read_request:
         else if (ap_filter_should_yield(c->output_filters)) {
             pending = OK;
         }
-        if (pending == OK) {
+        if (pending == OK || (pending == DECLINED &&
+                              cs->pub.sense == CONN_SENSE_WANT_READ)) {
             /* Still in WRITE_COMPLETION_STATE:
-             * Set a write timeout for this connection, and let the
-             * event thread poll for writeability.
+             * Set a read/write timeout for this connection, and let the
+             * event thread poll for read/writeability.
              */
             cs->queue_timestamp = apr_time_now();
             notify_suspend(cs);