diff options
author | Stefan Eissing <icing@apache.org> | 2019-05-28 12:52:37 +0000 |
---|---|---|
committer | Stefan Eissing <icing@apache.org> | 2019-05-28 12:52:37 +0000 |
commit | 60e97901fc2217802a06be2ccb66ee5c2c3b82c6 (patch) | |
tree | 9450bad20bc60b6932d0456270cbcdac45009622 /modules/http2/h2_headers.c | |
parent | 5b32f27b77efc4688a3c81f26abb1246c2e97867 (diff) | |
download | httpd-60e97901fc2217802a06be2ccb66ee5c2c3b82c6.tar.gz |
* modules/http2: more copying of data to disentangle worker processing from main connection
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1860260 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http2/h2_headers.c')
-rw-r--r-- | modules/http2/h2_headers.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/http2/h2_headers.c b/modules/http2/h2_headers.c index fe6ba790f4..1ef89d9f73 100644 --- a/modules/http2/h2_headers.c +++ b/modules/http2/h2_headers.c @@ -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, |