From bea40bf64ce390476dc05c48a8699e76a96320a2 Mon Sep 17 00:00:00 2001
From: Stefan Eissing <icing@apache.org>
Date: Tue, 15 Jan 2019 10:00:06 +0000
Subject: [PATCH] Merge of r1846125 from trunk:

mod_http2: change in cleanup strategy for slave connections.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1851329 13f79535-47bb-0310-9956-ffa450edef68
---
 STATUS                     | 5 -----
 modules/http2/h2_conn.c    | 9 +++++++++
 modules/http2/h2_version.h | 4 ++--
 3 files changed, 11 insertions(+), 7 deletions(-)

# diff --git a/STATUS b/STATUS
# index c3e074344d..d375fd05dd 100644
# --- a/STATUS
# +++ b/STATUS
# @@ -126,11 +126,6 @@ RELEASE SHOWSTOPPERS:
#  PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
#    [ start all new proposals below, under PATCHES PROPOSED. ]
#  
# -  *) mod_http2: change in cleanup strategy for slave connections.
# -     trunk patch: http://svn.apache.org/r1846125
# -     2.4.x patch: svn merge -c 1846125 ^/httpd/httpd/trunk .
# -     +1: icing, jim, wrowe
# -
#    *) mod_session: Always decode session attributes early.
#       trunk patch: http://svn.apache.org/r1850947
#       2.4.x patch: svn merge -c 1850947 ^/httpd/httpd/trunk .
diff --git a/modules/http2/h2_conn.c b/modules/http2/h2_conn.c
index 2e956593aa..88da2bab3e 100644
--- a/modules/http2/h2_conn.c
+++ b/modules/http2/h2_conn.c
@@ -354,6 +354,15 @@ apr_status_t h2_slave_run_pre_connection(conn_rec *slave, apr_socket_t *csd)
          * (Not necessarily in pre_connection, but later. Set it here, so it
          * is in place.) */
         slave->keepalives = 1;
+        /* We signal that this connection will be closed after the request.
+         * Which is true in that sense that we throw away all traffic data
+         * on this slave connection after each requests. Although we might
+         * reuse internal structures like memory pools.
+         * The wanted effect of this is that httpd does not try to clean up
+         * any dangling data on this connection when a request is done. Which
+         * is unneccessary on a h2 stream.
+         */
+        slave->keepalive = AP_CONN_CLOSE;
         return ap_run_pre_connection(slave, csd);
     }
     return APR_SUCCESS;
diff --git a/modules/http2/h2_version.h b/modules/http2/h2_version.h
index 13b7add273..7079437267 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.11.3"
+#define MOD_HTTP2_VERSION "1.11.4"
 
 /**
  * @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 0x010b03
+#define MOD_HTTP2_VERSION_NUM 0x010b04
 
 
 #endif /* mod_h2_h2_version_h */
-- 
2.17.1

