You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2002/01/02 22:34:50 UTC
cvs commit: httpd-2.0/server request.c
wrowe 02/01/02 13:34:50
Modified: server request.c
Log:
Eliminate a duplicate absolute path test, and NEVER serve a request
for an APR_DIR file from the cache when we have path_info, it is a
contradition (APR_DIR always forces dir_walk to gather the next segment
from path_info, even if it is APR_NOFILE, until we have no path_info.)
So we can't use a predetermined filename/path_info combo, ever, if the
filename resolves to an APR_DIR.
Revision Changes Path
1.89 +11 -9 httpd-2.0/server/request.c
Index: request.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/request.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- request.c 1 Jan 2002 20:36:18 -0000 1.88
+++ request.c 2 Jan 2002 21:34:50 -0000 1.89
@@ -454,15 +454,15 @@
/* XXX: Better (faster) tests needed!!!
*
* "OK" as a response to a real problem is not _OK_, but to allow broken
- * modules to proceed, we will permit the not-a-path filename to pass here.
- * We must catch it later if it's heading for the core handler. Leave an
- * INFO note here for module debugging.
+ * modules to proceed, we will permit the not-a-path filename to pass the
+ * following two tests. This behavior may be revoked in future versions
+ * of Apache. We still must catch it later if it's heading for the core
+ * handler. Leave INFO notes here for module debugging.
*/
- if (r->filename == NULL || !ap_os_is_path_absolute(r->pool, r->filename)) {
+ if (r->filename == NULL) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, r,
- "Module bug? Request filename path %s is missing "
- "or not absolute for uri %s",
- r->filename ? r->filename : "<NULL>", r->uri);
+ "Module bug? Request filename is missing for URI %s",
+ r->uri);
return OK;
}
@@ -513,8 +513,10 @@
* and the vhost's list of directory sections hasn't changed,
* we can skip rewalking the directory_walk entries.
*/
- if (cache->cached && ((r->finfo.filetype == APR_REG)
- || (r->finfo.filetype == APR_DIR))
+ if (cache->cached
+ && ((r->finfo.filetype == APR_REG)
+ || ((r->finfo.filetype == APR_DIR)
+ && (!r->path_info || !*r->path_info)))
&& (cache->dir_conf_tested == sec_ent)
&& (strcmp(entry_dir, cache->cached) == 0)) {
/* Well this looks really familiar! If our end-result (per_dir_result)