diff options
author | Eric Covener <covener@apache.org> | 2024-06-24 19:22:51 +0200 |
---|---|---|
committer | Eric Covener <covener@apache.org> | 2024-06-24 19:22:51 +0200 |
commit | 925b6f0ceb8983a11662b5f3a6f2fa75860c2cde (patch) | |
tree | 40372f74b0a86da15b1e9502c9efa9549b16e202 /server | |
parent | mod_proxy: escape for non-proxypass configuration (diff) | |
download | apache2-925b6f0ceb8983a11662b5f3a6f2fa75860c2cde.tar.xz apache2-925b6f0ceb8983a11662b5f3a6f2fa75860c2cde.zip |
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
Diffstat (limited to 'server')
-rw-r--r-- | server/config.c | 2 | ||||
-rw-r--r-- | server/core.c | 2 |
2 files changed, 2 insertions, 2 deletions
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; |