]> granicus.if.org Git - apache/commitdiff
mod_mime: detect invalid use of MultiviewsMatch inside Location and
authorDaniel Earl Poirier <poirier@apache.org>
Mon, 14 Sep 2009 16:32:30 +0000 (16:32 +0000)
committerDaniel Earl Poirier <poirier@apache.org>
Mon, 14 Sep 2009 16:32:30 +0000 (16:32 +0000)
LocationMatch sections.  Document that such usage is not valid.
PR47754.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@814728 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
docs/manual/mod/mod_mime.xml
modules/http/mod_mime.c

diff --git a/CHANGES b/CHANGES
index e5dd6766689774cba03d2baf1a23b1ebf86e6844..3762ea7d134d9f84eb911583f85286afcb775603 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.3.3
 
+  *) mod_mime: Detect invalid use of MultiviewsMatch inside Location and
+     LocationMatch sections.  PR47754. [Dan Poirier]
+
   *) mod_request: Make sure the KeptBodySize directive rejects values
      that aren't valid numbers. [Graham Leggett]
 
index 292f38af01e97ff0e7ee7057f252c32af9daacb8..fd4f21812d9acb3f7e938673b24ac8dd2d949f87 100644 (file)
@@ -608,6 +608,11 @@ a matching file with MultiViews</description>
     <example>
       MultiviewsMatch Handlers Filters
     </example>
+
+    <p><directive>MultiviewsMatch</directive> is not allowed in a
+    <directive type="section" module="core">Location</directive> or <directive
+    type="section" module="core">LocationMatch</directive> section.</p>
+
 </usage>
 <seealso><directive module="core">Options</directive></seealso>
 <seealso><module>mod_negotiation</module></seealso>
index 818b7d4a56286f21c8e4fcad4c19ab2602807c6e..95709766eb05a059167ab5a9a318151f73f656c3 100644 (file)
@@ -312,6 +312,12 @@ static const char *multiviews_match(cmd_parms *cmd, void *m_,
                                     const char *include)
 {
     mime_dir_config *m = (mime_dir_config *) m_;
+    const char *errmsg;
+
+    errmsg = ap_check_cmd_context(cmd, NOT_IN_LOCATION);
+    if (errmsg != NULL) {
+        return errmsg;
+    }
 
     if (strcasecmp(include, "Any") == 0) {
         if (m->multimatch && (m->multimatch & ~MULTIMATCH_ANY)) {