]> granicus.if.org Git - apache/commitdiff
Check an alternative return value for when a file or directory does not exist. Previ...
authorPaul Querna <pquerna@apache.org>
Wed, 20 Jul 2005 11:20:33 +0000 (11:20 +0000)
committerPaul Querna <pquerna@apache.org>
Wed, 20 Jul 2005 11:20:33 +0000 (11:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@219879 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/mappers/mod_negotiation.c

diff --git a/CHANGES b/CHANGES
index 8ae9112ee427292d50045b9831a128188e84a4be..2ccc36695025c3a4d9f366da8f419a091cb1e88f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,10 @@
                                                         -*- coding: utf-8 -*-
 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)
index 0e94210bf46f85c93dbdcbff1b7085c6f31a7373..9676adf3949a78ab600f2e24f828244eb79a2f11 100644 (file)
@@ -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);