Commit 8b955960 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

  Thanks goes to Manoj, while commenting on another issue, for triggering
  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
parent 098e7461
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1067,6 +1067,18 @@ static int read_types_multi(negotiation_state *neg)

    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