httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject current cvs cannot serve static files
Date Fri, 24 Aug 2001 00:55:16 GMT
current cvs default_handler is failing for pages that exist.  problem is
due to ap_os_is_path_absolute() return false (in directory_walk), when the
path is in fact absolute, so get_path_info() never happens, leaving 
r->finfo.filetype == 0.  am i the only one seeing this?  patch below
fixes here.

--- server/util.c       2001/08/23 19:08:19     1.109
+++ server/util.c       2001/08/24 00:42:00
@@ -258,8 +258,15 @@
 AP_DECLARE(int) ap_os_is_path_absolute(apr_pool_t *p, const char *dir) 
 {
     const char *newpath;
-    if (apr_filepath_root(&newpath, &dir, 0, p) != APR_SUCCESS
-            || strncmp(newpath, dir, strlen(newpath)) != 0) {
+    apr_status_t rv = apr_filepath_root(&newpath, &dir, 0, p);
+
+    if (rv == APR_EABSOLUTE) {
+        return 1;
+    }
+
+    if (rv != APR_SUCCESS ||
+        strncmp(newpath, dir, strlen(newpath)) != 0)
+    {
         return 0;
     }
     return 1;



Mime
View raw message