You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2024/07/02 11:19:45 UTC
svn commit: r1918823 - in /httpd/httpd/trunk/modules: filters/mod_ext_filter.c generators/mod_autoindex.c http/byterange_filter.c http/http_request.c proxy/mod_proxy_ftp.c
Author: rpluem
Date: Tue Jul 2 11:19:45 2024
New Revision: 1918823
URL: http://svn.apache.org/viewvc?rev=1918823&view=rev
Log:
* Follow up to r1918814: Strings are from configuration and thus trusted
Modified:
httpd/httpd/trunk/modules/filters/mod_ext_filter.c
httpd/httpd/trunk/modules/generators/mod_autoindex.c
httpd/httpd/trunk/modules/http/byterange_filter.c
httpd/httpd/trunk/modules/http/http_request.c
httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c
Modified: httpd/httpd/trunk/modules/filters/mod_ext_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_ext_filter.c?rev=1918823&r1=1918822&r2=1918823&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_ext_filter.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_ext_filter.c Tue Jul 2 11:19:45 2024
@@ -610,7 +610,7 @@ static apr_status_t init_filter_instance
}
if (ctx->filter->outtype &&
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) {
/* nasty, but needed to avoid confusing the browser
Modified: httpd/httpd/trunk/modules/generators/mod_autoindex.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_autoindex.c?rev=1918823&r1=1918822&r2=1918823&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_autoindex.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_autoindex.c Tue Jul 2 11:19:45 2024
@@ -2060,11 +2060,11 @@ static int index_directory(request_rec *
#endif
}
if (*charset) {
- ap_set_content_type(r, apr_pstrcat(r->pool, ctype, ";charset=",
- charset, NULL));
+ ap_set_content_type_ex(r, apr_pstrcat(r->pool, ctype, ";charset=",
+ charset, NULL), 1);
}
else {
- ap_set_content_type(r, ctype);
+ ap_set_content_type_ex(r, ctype, 1);
}
if (autoindex_opts & TRACK_MODIFIED) {
Modified: httpd/httpd/trunk/modules/http/byterange_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/byterange_filter.c?rev=1918823&r1=1918822&r2=1918823&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/byterange_filter.c (original)
+++ httpd/httpd/trunk/modules/http/byterange_filter.c Tue Jul 2 11:19:45 2024
@@ -473,9 +473,9 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
/* Is ap_make_content_type required here? */
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=",
- ap_multipart_boundary, NULL));
+ ap_multipart_boundary, NULL), 1);
if (orig_ct) {
bound_head = apr_pstrcat(r->pool,
Modified: httpd/httpd/trunk/modules/http/http_request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_request.c?rev=1918823&r1=1918822&r2=1918823&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_request.c (original)
+++ httpd/httpd/trunk/modules/http/http_request.c Tue Jul 2 11:19:45 2024
@@ -805,7 +805,7 @@ AP_DECLARE(void) ap_internal_redirect_ha
}
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);
if (access_status == OK) {
access_status = ap_invoke_handler(new);
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c?rev=1918823&r1=1918822&r2=1918823&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c Tue Jul 2 11:19:45 2024
@@ -1878,10 +1878,10 @@ static int proxy_ftp_handler(request_rec
/* set content-type */
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 :
- "ISO-8859-1", NULL));
+ "ISO-8859-1", NULL), 1);
}
else {
if (xfer_type != 'A' && size != NULL) {