summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2024-01-17 09:38:02 +0100
committerStefan Eissing <icing@apache.org>2024-01-17 09:38:02 +0100
commitbc0e56cdd3eebbe0fae3f9f5770b09236e8a4a17 (patch)
treefc928af7aad8ccabea79376fd16d464f7d6cdd5e
parentmod_headers: Avoid infinite recursion with the edit* action and empty matches. (diff)
downloadapache2-bc0e56cdd3eebbe0fae3f9f5770b09236e8a4a17.tar.xz
apache2-bc0e56cdd3eebbe0fae3f9f5770b09236e8a4a17.zip
*) mod_http2: v2.0.26 with the following fixes:
- Fixed `Date` header on requests upgraded from HTTP/1.1 (h2c). Fixes <https://github.com/icing/mod_h2/issues/272>. - Fixed small memory leak in h2 header bucket free. Thanks to Michael Kaufmann for finding this and providing the fix. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1915281 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--changes-entries/h2_date_and_bucket_leak.txt6
-rw-r--r--modules/http2/h2.h2
-rw-r--r--modules/http2/h2_headers.c11
-rw-r--r--modules/http2/h2_request.c1
-rw-r--r--modules/http2/h2_version.h4
5 files changed, 20 insertions, 4 deletions
diff --git a/changes-entries/h2_date_and_bucket_leak.txt b/changes-entries/h2_date_and_bucket_leak.txt
new file mode 100644
index 0000000000..3144d5a047
--- /dev/null
+++ b/changes-entries/h2_date_and_bucket_leak.txt
@@ -0,0 +1,6 @@
+ *) mod_http2: v2.0.26 with the following fixes:
+ - Fixed `Date` header on requests upgraded from HTTP/1.1 (h2c). Fixes
+ <https://github.com/icing/mod_h2/issues/272>.
+ - Fixed small memory leak in h2 header bucket free. Thanks to
+ Michael Kaufmann for finding this and providing the fix.
+
diff --git a/modules/http2/h2.h b/modules/http2/h2.h
index 30ad990443..f496a6dcb2 100644
--- a/modules/http2/h2.h
+++ b/modules/http2/h2.h
@@ -35,7 +35,7 @@ struct h2_stream;
#define H2_USE_PIPES (APR_FILES_AS_SOCKETS && APR_VERSION_AT_LEAST(1,6,0))
#endif
-#if AP_MODULE_MAGIC_AT_LEAST(20211221, 15)
+#if AP_MODULE_MAGIC_AT_LEAST(20120211, 129)
#define H2_USE_POLLFD_FROM_CONN 1
#else
#define H2_USE_POLLFD_FROM_CONN 0
diff --git a/modules/http2/h2_headers.c b/modules/http2/h2_headers.c
index 0fc1d91d6a..d9b3fd09b0 100644
--- a/modules/http2/h2_headers.c
+++ b/modules/http2/h2_headers.c
@@ -90,9 +90,18 @@ h2_headers *h2_bucket_headers_get(apr_bucket *b)
return NULL;
}
+static void bucket_destroy(void *data)
+{
+ h2_bucket_headers *h = data;
+
+ if (apr_bucket_shared_destroy(h)) {
+ apr_bucket_free(h);
+ }
+}
+
const apr_bucket_type_t h2_bucket_type_headers = {
"H2HEADERS", 5, APR_BUCKET_METADATA,
- apr_bucket_destroy_noop,
+ bucket_destroy,
bucket_read,
apr_bucket_setaside_noop,
apr_bucket_split_notimpl,
diff --git a/modules/http2/h2_request.c b/modules/http2/h2_request.c
index de312e5889..2713947c37 100644
--- a/modules/http2/h2_request.c
+++ b/modules/http2/h2_request.c
@@ -120,6 +120,7 @@ apr_status_t h2_request_rcreate(h2_request **preq, apr_pool_t *pool,
req->path = path;
req->headers = apr_table_make(pool, 10);
req->http_status = H2_HTTP_STATUS_UNSET;
+ req->request_time = apr_time_now();
x.pool = pool;
x.headers = req->headers;
diff --git a/modules/http2/h2_version.h b/modules/http2/h2_version.h
index cf89154e90..80cec13415 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 "2.0.21"
+#define MOD_HTTP2_VERSION "2.0.26"
/**
* @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 0x020015
+#define MOD_HTTP2_VERSION_NUM 0x02001a
#endif /* mod_h2_h2_version_h */