]> granicus.if.org Git - apache/commitdiff
Merge r1830562 from trunk:
authorJim Jagielski <jim@apache.org>
Wed, 30 May 2018 19:13:36 +0000 (19:13 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 30 May 2018 19:13:36 +0000 (19:13 +0000)
On the trunk:

mod_http2: restoring the v1.10.16 keepalive timeout behavioud of mod_http2 (to be verified).

ALSO: mod_http2: adding regular memory cleanup when transferring large response bodies. This
      reduces memory footprint and avoids memory exhaustion when transferring large files
      on 32-bit architectures. Fixes PR 62325.

Submitted by: icing
Reviewed by: icing, ylavic, jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1832566 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/http2/h2_bucket_beam.c
modules/http2/h2_conn.c
modules/http2/h2_version.h

diff --git a/STATUS b/STATUS
index b0da0b710b004048c1fae69b961ef3ee08806b06..ce3de8aba2f38aa1641d023894b228d884399172 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -135,16 +135,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_http2: Restore keepalive timing of v1.10.16, see https://github.com/icing/mod_h2/issues/160.
-     trunk patch: http://svn.apache.org/1830562
-     2.4.x patch: https://svn.apache.org/repos/asf/httpd/httpd/patches/2.4.x/h2_keepalive_restore.patch
-     +1: icing, ylavic, jim
-
-  *) mod_http2: adding regular memory cleanup when transferring large response bodies. This
-     reduces memory footprint and avoids memory exhaustion when transferring large files
-     on 32-bit architectures. Fixes PR 62325.
-     2.4.x patch: https://svn.apache.org/repos/asf/httpd/httpd/patches/2.4.x/h2_beam_purge.patch
-     +1: icing, ylavic, jim
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
index 7653ec1092e537ec3616333f79370e47e5000f19..9f6fa824f62c81f70ecfb01675382e6ca26ea7cc 100644 (file)
@@ -923,6 +923,7 @@ apr_status_t h2_beam_send(h2_bucket_beam *beam,
             while (!APR_BRIGADE_EMPTY(sender_bb) && APR_SUCCESS == rv) {
                 if (space_left <= 0) {
                     report_prod_io(beam, force_report, &bl);
+                    r_purge_sent(beam);
                     rv = wait_not_full(beam, block, &space_left, &bl);
                     if (APR_SUCCESS != rv) {
                         break;
index 862d4c19596f64c5362b63facd16729b177676bb..2e956593aa26d85073e402b5f09fdd296baad00c 100644 (file)
@@ -229,7 +229,19 @@ apr_status_t h2_conn_run(struct h2_ctx *ctx, conn_rec *c)
              && mpm_state != AP_MPMQ_STOPPING);
 
     if (c->cs) {
-        c->cs->state = CONN_STATE_LINGER;
+        switch (session->state) {
+            case H2_SESSION_ST_INIT:
+            case H2_SESSION_ST_IDLE:
+            case H2_SESSION_ST_BUSY:
+            case H2_SESSION_ST_WAIT:
+                c->cs->state = CONN_STATE_WRITE_COMPLETION;
+                break;
+            case H2_SESSION_ST_CLEANUP:
+            case H2_SESSION_ST_DONE:
+            default:
+                c->cs->state = CONN_STATE_LINGER;
+            break;
+        }
     }
 
     return APR_SUCCESS;
index 50cfd118ae7f20d5a8093596a0f4b20f95a9e96a..5c53abd57510c3d52e55b4ca43cc9f135e7b86ec 100644 (file)
@@ -27,7 +27,7 @@
  * @macro
  * Version number of the http2 module as c string
  */
-#define MOD_HTTP2_VERSION "1.10.17"
+#define MOD_HTTP2_VERSION "1.10.20"
 
 /**
  * @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 0x010a11
+#define MOD_HTTP2_VERSION_NUM 0x010a14
 
 
 #endif /* mod_h2_h2_version_h */