1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

* Follow up to r1918814: Strings are from configuration and thus trusted

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918823 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ruediger Pluem
2024-07-02 11:19:45 +00:00
parent 8ad3ec08d4
commit fbe782e6c4
5 changed files with 9 additions and 9 deletions

View File

@@ -610,7 +610,7 @@ static apr_status_t init_filter_instance(ap_filter_t *f)
} }
if (ctx->filter->outtype && if (ctx->filter->outtype &&
ctx->filter->outtype != OUTTYPE_UNCHANGED) { ctx->filter->outtype != OUTTYPE_UNCHANGED) {
ap_set_content_type(f->r, ctx->filter->outtype); ap_set_content_type_ex(f->r, ctx->filter->outtype, 1);
} }
if (ctx->filter->preserves_content_length != 1) { if (ctx->filter->preserves_content_length != 1) {
/* nasty, but needed to avoid confusing the browser /* nasty, but needed to avoid confusing the browser

View File

@@ -2060,11 +2060,11 @@ static int index_directory(request_rec *r,
#endif #endif
} }
if (*charset) { if (*charset) {
ap_set_content_type(r, apr_pstrcat(r->pool, ctype, ";charset=", ap_set_content_type_ex(r, apr_pstrcat(r->pool, ctype, ";charset=",
charset, NULL)); charset, NULL), 1);
} }
else { else {
ap_set_content_type(r, ctype); ap_set_content_type_ex(r, ctype, 1);
} }
if (autoindex_opts & TRACK_MODIFIED) { if (autoindex_opts & TRACK_MODIFIED) {

View File

@@ -473,9 +473,9 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f,
/* Is ap_make_content_type required here? */ /* Is ap_make_content_type required here? */
const char *orig_ct = ap_make_content_type(r, r->content_type); const char *orig_ct = ap_make_content_type(r, r->content_type);
ap_set_content_type(r, apr_pstrcat(r->pool, ap_set_content_type_ex(r, apr_pstrcat(r->pool,
"multipart/byteranges; boundary=", "multipart/byteranges; boundary=",
ap_multipart_boundary, NULL)); ap_multipart_boundary, NULL), 1);
if (orig_ct) { if (orig_ct) {
bound_head = apr_pstrcat(r->pool, bound_head = apr_pstrcat(r->pool,

View File

@@ -805,7 +805,7 @@ AP_DECLARE(void) ap_internal_redirect_handler(const char *new_uri, request_rec *
} }
if (r->handler) if (r->handler)
ap_set_content_type(new, r->content_type); ap_set_content_type_ex(new, r->content_type, AP_REQUEST_IS_TRUSTED_CT(r));
access_status = ap_process_request_internal(new); access_status = ap_process_request_internal(new);
if (access_status == OK) { if (access_status == OK) {
access_status = ap_invoke_handler(new); access_status = ap_invoke_handler(new);

View File

@@ -1878,10 +1878,10 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
/* set content-type */ /* set content-type */
if (dirlisting) { if (dirlisting) {
ap_set_content_type(r, apr_pstrcat(p, "text/html;charset=", ap_set_content_type_ex(r, apr_pstrcat(p, "text/html;charset=",
fdconf->ftp_directory_charset ? fdconf->ftp_directory_charset ?
fdconf->ftp_directory_charset : fdconf->ftp_directory_charset :
"ISO-8859-1", NULL)); "ISO-8859-1", NULL), 1);
} }
else { else {
if (xfer_type != 'A' && size != NULL) { if (xfer_type != 'A' && size != NULL) {