]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Follow up to r1918814: Always trust content types that we set literally
authorRuediger Pluem <rpluem@apache.org>
Tue, 2 Jul 2024 06:57:23 +0000 (06:57 +0000)
committerRuediger Pluem <rpluem@apache.org>
Tue, 2 Jul 2024 06:57:23 +0000 (06:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918815 13f79535-47bb-0310-9956-ffa450edef68

modules/dav/main/mod_dav.c

index 30f724ef781910c62023d6f25e57dcc1eb7881ca..17caaf8969ba172f14d2d598e1c4f41660b5dc52 100644 (file)
@@ -4495,7 +4495,7 @@ static int dav_method_report(request_rec *r)
 
     /* set up defaults for the report response */
     r->status = HTTP_OK;
-    ap_set_content_type(r, DAV_XML_CONTENT_TYPE);
+    ap_set_content_type_ex(r, DAV_XML_CONTENT_TYPE, 1);
     err = NULL;
 
     /* run report hook */
@@ -4803,7 +4803,7 @@ static int dav_method_merge(request_rec *r)
        is going to do something different (i.e. an error), then it must
        return a dav_error, and we'll reset these values properly. */
     r->status = HTTP_OK;
-    ap_set_content_type(r, "text/xml");
+    ap_set_content_type_ex(r, "text/xml", 1);
 
     /* ### should we do any preliminary response generation? probably not,
        ### because we may have an error, thus demanding something else in