Skip to content

Commit f7f0f9b

Browse files
committed
Merge r1915281 from trunk:
*) mod_http2: v2.0.26 with the following fixes: - Fixed `Date` header on requests upgraded from HTTP/1.1 (h2c). Fixes <icing/mod_h2#272>. - Fixed small memory leak in h2 header bucket free. Thanks to Michael Kaufmann for finding this and providing the fix. Submitted by: icing Reviewed by: icing, gbechis, jorton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1916413 13f79535-47bb-0310-9956-ffa450edef68
1 parent fb6dd55 commit f7f0f9b

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*) mod_http2: v2.0.26 with the following fixes:
2+
- Fixed `Date` header on requests upgraded from HTTP/1.1 (h2c). Fixes
3+
<https://github.com/icing/mod_h2/issues/272>.
4+
- Fixed small memory leak in h2 header bucket free. Thanks to
5+
Michael Kaufmann for finding this and providing the fix.
6+

modules/http2/h2_headers.c

+10-1
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,18 @@ h2_headers *h2_bucket_headers_get(apr_bucket *b)
9090
return NULL;
9191
}
9292

93+
static void bucket_destroy(void *data)
94+
{
95+
h2_bucket_headers *h = data;
96+
97+
if (apr_bucket_shared_destroy(h)) {
98+
apr_bucket_free(h);
99+
}
100+
}
101+
93102
const apr_bucket_type_t h2_bucket_type_headers = {
94103
"H2HEADERS", 5, APR_BUCKET_METADATA,
95-
apr_bucket_destroy_noop,
104+
bucket_destroy,
96105
bucket_read,
97106
apr_bucket_setaside_noop,
98107
apr_bucket_split_notimpl,

modules/http2/h2_request.c

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ apr_status_t h2_request_rcreate(h2_request **preq, apr_pool_t *pool,
120120
req->path = path;
121121
req->headers = apr_table_make(pool, 10);
122122
req->http_status = H2_HTTP_STATUS_UNSET;
123+
req->request_time = apr_time_now();
123124

124125
x.pool = pool;
125126
x.headers = req->headers;

0 commit comments

Comments
 (0)