]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1860260 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 13 Jun 2019 11:08:29 +0000 (11:08 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 13 Jun 2019 11:08:29 +0000 (11:08 +0000)
 * modules/http2: more copying of data to disentangle worker processing from main connection

Submitted by: icing
Reviewed by: icing, covener, jim

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

STATUS
modules/http2/h2_headers.c
modules/http2/h2_headers.h
modules/http2/h2_session.c
modules/http2/h2_version.h

diff --git a/STATUS b/STATUS
index 8db2e26ed92b376ebdd973c2fabdbf2b003aeb58..0d9f873a9bb3612169ec2aaea65d2421fd259c0d 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -135,11 +135,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.4.x patch: svn merge -c 1707084,1707093,1707159,1707362 ^/httpd/httpd/trunk .
      +1: icing, covener, jim
 
-  *) mod_http2:  more copying of data to disentangle worker processing from main connection
-     trunk patch: http://svn.apache.org/r1860260
-     2.4.x patch: svn merge -c 1860260 ^/httpd/httpd/trunk .
-     +1: icing, covener, jim
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index fe6ba790f442a699ce8866101c2c01c3466cd448..1ef89d9f73a1af3384705254370170b2a93dee8b 100644 (file)
@@ -102,8 +102,9 @@ apr_bucket *h2_bucket_headers_beam(struct h2_bucket_beam *beam,
                                     const apr_bucket *src)
 {
     if (H2_BUCKET_IS_HEADERS(src)) {
-        h2_headers *r = ((h2_bucket_headers *)src->data)->headers;
-        apr_bucket *b = h2_bucket_headers_create(dest->bucket_alloc, r);
+        h2_headers *src_headers = ((h2_bucket_headers *)src->data)->headers;
+        apr_bucket *b = h2_bucket_headers_create(dest->bucket_alloc, 
+                                                 h2_headers_clone(dest->p, src_headers));
         APR_BRIGADE_INSERT_TAIL(dest, b);
         return b;
     }
@@ -156,7 +157,14 @@ h2_headers *h2_headers_rcreate(request_rec *r, int status,
 
 h2_headers *h2_headers_copy(apr_pool_t *pool, h2_headers *h)
 {
-    return h2_headers_create(h->status, h->headers, h->notes, h->raw_bytes, pool);
+    return h2_headers_create(h->status, apr_table_copy(pool, h->headers), 
+                             apr_table_copy(pool, h->notes), h->raw_bytes, pool);
+}
+
+h2_headers *h2_headers_clone(apr_pool_t *pool, h2_headers *h)
+{
+    return h2_headers_create(h->status, apr_table_clone(pool, h->headers), 
+                             apr_table_clone(pool, h->notes), h->raw_bytes, pool);
 }
 
 h2_headers *h2_headers_die(apr_status_t type,
index 840e8c43332328a0fe9b8bacc0c2263ee05fc3dc..b7d95a11be70ea7555520ba8f17aa072871f0194 100644 (file)
@@ -59,11 +59,17 @@ h2_headers *h2_headers_rcreate(request_rec *r, int status,
                                  apr_table_t *header, apr_pool_t *pool);
 
 /**
- * Clone the headers into another pool. This will not copy any
+ * Copy the headers into another pool. This will not copy any
  * header strings.
  */
 h2_headers *h2_headers_copy(apr_pool_t *pool, h2_headers *h);
 
+/**
+ * Clone the headers into another pool. This will also clone any
+ * header strings.
+ */
+h2_headers *h2_headers_clone(apr_pool_t *pool, h2_headers *h);
+
 /**
  * Create the headers for the given error.
  * @param stream_id id of the stream to create the headers for
index 0bd84435ec6668e6728c95b5a80fb951e5b08808..e9430e9a2d34a7503209757026412514e5d14dbb 100644 (file)
@@ -1977,6 +1977,7 @@ static void on_stream_state_enter(void *ctx, h2_stream *stream)
             ev_stream_closed(session, stream);
             break;
         case H2_SS_CLEANUP:
+            nghttp2_session_set_stream_user_data(session->ngh2, stream->id, NULL);
             h2_mplx_stream_cleanup(session->mplx, stream);
             break;
         default:
index bfaae831e78df91dd7ec8c03d1d7424f09388101..52cf88b5e62a4b089c1ea7856481ec8bd34ac291 100644 (file)
@@ -27,7 +27,7 @@
  * @macro
  * Version number of the http2 module as c string
  */
-#define MOD_HTTP2_VERSION "1.14.1"
+#define MOD_HTTP2_VERSION "1.15.1"
 
 /**
  * @macro
@@ -35,6 +35,6 @@
  * 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 0x010e01
+#define MOD_HTTP2_VERSION_NUM 0x010f01
 
 #endif /* mod_h2_h2_version_h */