diff options
author | Stefan Eissing <icing@apache.org> | 2022-12-17 10:21:56 +0000 |
---|---|---|
committer | Stefan Eissing <icing@apache.org> | 2022-12-17 10:21:56 +0000 |
commit | be39909cf3eb1051db9b68a7abd6d0ab0e400e52 (patch) | |
tree | d3d25fc13e386d5a6743235d32315cd189cd427e /modules | |
parent | 36621b405367fc63a8f11d642e26c6656326557e (diff) | |
download | httpd-be39909cf3eb1051db9b68a7abd6d0ab0e400e52.tar.gz |
*) mod_proxy_http2: apply the standard httpd content type handling
to responses from the backend, as other proxy modules do. Fixes PR 66391.
Thanks to Jérôme Billiras for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906051 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r-- | modules/http2/h2_proxy_session.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/http2/h2_proxy_session.c b/modules/http2/h2_proxy_session.c index 3da57f9e73..c3f2ff3010 100644 --- a/modules/http2/h2_proxy_session.c +++ b/modules/http2/h2_proxy_session.c @@ -447,6 +447,7 @@ static void h2_proxy_stream_end_headers_out(h2_proxy_stream *stream) h2_proxy_session *session = stream->session; request_rec *r = stream->r; apr_pool_t *p = r->pool; + const char *buf; /* Now, add in the cookies from the response to the ones already saved */ apr_table_do(add_header, stream->saves, r->headers_out, "Set-Cookie", NULL); @@ -456,6 +457,10 @@ static void h2_proxy_stream_end_headers_out(h2_proxy_stream *stream) apr_table_unset(r->headers_out, "Set-Cookie"); r->headers_out = apr_table_overlay(p, r->headers_out, stream->saves); } + + if ((buf = apr_table_get(r->headers_out, "Content-Type"))) { + ap_set_content_type(r, apr_pstrdup(p, buf)); + } /* handle Via header in response */ if (session->conf->viaopt != via_off |