this idea. If we find files matching (e.g. index.html.bak matches
index.html) but they are rejected because we don't understand them
(e.g. they are a directory, or .bak isn't a mod_mime recognized extension)
then Error 500 out of here, with a note for the system administrator
explaining that index.html matches some files, but their extensions
cannot be grokked. No more (unintentional, or situational) autoindex :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89961
13f79535-47bb-0310-9956-
ffa450edef68
apr_dir_close(dirp);
+ /* We found some file names that matched. None could be served.
+ * Rather than fall out to autoindex or some other mapper, this
+ * request must die.
+ */
+ if (anymatch && !neg->avail_vars->nelts) {
+ ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
+ "Negotiation: discovered file(s) matching request: %s"
+ " all containing unrecognized extension(s): ",
+ r->filename);
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
+
set_vlist_validator(r, r);
/* Sort the variants into a canonical order. The negotiation