httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r291672 - /httpd/httpd/trunk/modules/mappers/mod_dir.c
Date Mon, 26 Sep 2005 16:51:44 GMT
Author: colm
Date: Mon Sep 26 09:51:41 2005
New Revision: 291672

URL: http://svn.apache.org/viewcvs?rev=291672&view=rev
Log:
Explain why we have the regular file typecheck. No functional changes.


Modified:
    httpd/httpd/trunk/modules/mappers/mod_dir.c

Modified: httpd/httpd/trunk/modules/mappers/mod_dir.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/mappers/mod_dir.c?rev=291672&r1=291671&r2=291672&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_dir.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_dir.c Mon Sep 26 09:51:41 2005
@@ -178,8 +178,17 @@
 
         rr = ap_sub_req_lookup_uri(name_ptr, r, NULL);
 
-        /* XXX: (filetype == APR_REG) - we can't use a non-file index??? */
-        if (   rr->status == HTTP_OK
+        /* The sub request lookup is very liberal, and the core map_to_storage
+         * handler will almost always result in HTTP_OK as /foo/index.html
+         * may be /foo with PATH_INFO="/index.html", or even / with 
+         * PATH_INFO="/foo/index.html". To get around this we insist that the
+         * the index be a regular filetype.
+         *
+         * Another reason is that the core handler also makes the assumption 
+         * that if r->finfo is still NULL by the time it gets called, the 
+         * file does not exist.
+         */
+        if (rr->status == HTTP_OK
             && (   (rr->handler && !strcmp(rr->handler, "proxy-server"))
                 || rr->finfo.filetype == APR_REG)) {
             ap_internal_fast_redirect(rr, r);



Mime
View raw message