From 925b6f0ceb8983a11662b5f3a6f2fa75860c2cde Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Mon, 24 Jun 2024 17:22:51 +0000 Subject: add ap_set_content_type_ex to differentiate trusted sources git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918551 13f79535-47bb-0310-9956-ffa450edef68 --- server/config.c | 2 +- server/core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/config.c b/server/config.c index b59fea1d4f..712bcab3db 100644 --- a/server/config.c +++ b/server/config.c @@ -418,7 +418,7 @@ AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r) } if (!r->handler) { - if (r->content_type) { + if (r->content_type && AP_REQUEST_IS_TRUSTED_CT(r)) { handler = r->content_type; if ((p=ap_strchr_c(handler, ';')) != NULL) { char *new_handler = (char *)apr_pmemdup(r->pool, handler, diff --git a/server/core.c b/server/core.c index 3585382460..9f92981ef0 100644 --- a/server/core.c +++ b/server/core.c @@ -5098,7 +5098,7 @@ static int core_override_type(request_rec *r) /* Check for overrides with ForceType / SetHandler */ if (conf->mime_type && strcmp(conf->mime_type, "none")) - ap_set_content_type(r, (char*) conf->mime_type); + ap_set_content_type_ex(r, (char*) conf->mime_type, 1); if (conf->expr_handler) { const char *err; -- cgit v1.2.3