]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1908691 from trunk:
authorStefan Eissing <icing@apache.org>
Fri, 31 Mar 2023 12:04:33 +0000 (12:04 +0000)
committerStefan Eissing <icing@apache.org>
Fri, 31 Mar 2023 12:04:33 +0000 (12:04 +0000)
  *) mod_http2: fixed a crash during connection termination. See PR 66539.

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

changes-entries/http2_pr66539.txt [new file with mode: 0644]
modules/http2/h2_request.c

diff --git a/changes-entries/http2_pr66539.txt b/changes-entries/http2_pr66539.txt
new file mode 100644 (file)
index 0000000..7343330
--- /dev/null
@@ -0,0 +1,2 @@
+  *) mod_http2: fixed a crash during connection termination. See PR 66539.
+     [Stefan Eissing]
index bddbad5180d29baf5a4d45c253407ffd908f017a..20e94cd8a3c64ee380980dcf0b3cbc5a9ce34912 100644 (file)
@@ -279,7 +279,7 @@ static request_rec *my_ap_create_request(conn_rec *c)
 apr_bucket *h2_request_create_bucket(const h2_request *req, request_rec *r)
 {
     conn_rec *c = r->connection;
-    apr_table_t *headers = apr_table_copy(r->pool, req->headers);
+    apr_table_t *headers = apr_table_clone(r->pool, req->headers);
     const char *uri = req->path;
 
     AP_DEBUG_ASSERT(req->authority);
@@ -303,7 +303,7 @@ static void assign_headers(request_rec *r, const h2_request *req,
 {
     const char *cl;
 
-    r->headers_in = apr_table_copy(r->pool, req->headers);
+    r->headers_in = apr_table_clone(r->pool, req->headers);
     if (req->authority) {
         /* for internal handling, we have to simulate that :authority
          * came in as Host:, RFC 9113 ch. says that mismatches between