summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2019-07-03 15:46:31 +0200
committerStefan Eissing <icing@apache.org>2019-07-03 15:46:31 +0200
commit018caeddd81bc282acb2ed4df8fd0535cf4745f7 (patch)
tree0d3bc0102f8ce3ba513a10c0e24b7a42562f2129
parent* All backported (diff)
downloadapache2-018caeddd81bc282acb2ed4df8fd0535cf4745f7.tar.xz
apache2-018caeddd81bc282acb2ed4df8fd0535cf4745f7.zip
*) 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] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1862475 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES5
-rw-r--r--modules/http2/h2_conn.c7
-rw-r--r--modules/http2/h2_version.h4
-rw-r--r--server/mpm/event/event.c7
4 files changed, 18 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index eab4237a2b..35fd06ac7e 100644
--- 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.
diff --git a/modules/http2/h2_conn.c b/modules/http2/h2_conn.c
index d29cd7e996..796bea8f3c 100644
--- a/modules/http2/h2_conn.c
+++ b/modules/http2/h2_conn.c
@@ -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:
diff --git a/modules/http2/h2_version.h b/modules/http2/h2_version.h
index a26bdd8923..e5a9dca3fd 100644
--- a/modules/http2/h2_version.h
+++ b/modules/http2/h2_version.h
@@ -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 */
diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c
index 4bb2d5bd0f..f9cc820b95 100644
--- a/server/mpm/event/event.c
+++ b/server/mpm/event/event.c
@@ -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);