Commit 6732f6fa authored by Paul Querna's avatar Paul Querna
Browse files

Check an alternative return value for when a file or directory does not exist....

Check an alternative return value for when a file or directory does not exist.  Previously this would return a forbidden on the documentation website for any URL ending in .html.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@219879 13f79535-47bb-0310-9956-ffa450edef68
parent c378256f
Loading
Loading
Loading
Loading
+3 −0
Changes for CHANGES: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@
Changes with Apache 2.1.7
  [Remove entries to the current 2.0 section below, when backported]
  *) mod_negotiation: Correctly report 404 instead of 403 for missing files.
     [Paul Querna]
  *)  new hook (request_status) that gets ran in proxy_handler just before 
      the final return.  This gives modules an opportunity to do something 
      based on the proxy status. (minor MMN bump)
+6 −1
Changes for modules/mappers/mod_negotiation.c: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -957,7 +957,12 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg,
                APR_OS_DEFAULT, neg->pool)) != APR_SUCCESS) {
        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
                      "cannot access type map file: %s", rr->filename);
        return APR_STATUS_IS_ENOENT(status) ? HTTP_NOT_FOUND : HTTP_FORBIDDEN;
        if (APR_STATUS_IS_ENOTDIR(status) || APR_STATUS_IS_ENOENT(status)) {
            return HTTP_NOT_FOUND;
        }
        else {
            return HTTP_FORBIDDEN;
        }
    }

    clean_var_rec(&mime_info);