]> granicus.if.org Git - apache/commitdiff
I don't know if this is the Right Way, but it certainly does make things
authorCliff Woolley <jwoolley@apache.org>
Fri, 24 Aug 2001 01:26:31 +0000 (01:26 +0000)
committerCliff Woolley <jwoolley@apache.org>
Fri, 24 Aug 2001 01:26:31 +0000 (01:26 +0000)
work better right now.  httpd-test is much much happier with this patch
(ie, we can serve pages again :)  I'm still seeing issues with mod_include,
but that's probably a different problem... will investigate.

Submitted by: Doug MacEachern

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90603 13f79535-47bb-0310-9956-ffa450edef68

server/util.c

index 6e38fafbed399de42da5d04aee0f9572035c9669..475dac4b66a10a72072e08d982bc212111118d4e 100644 (file)
@@ -259,8 +259,13 @@ AP_DECLARE(int) ap_os_is_path_absolute(apr_pool_t *p, const char *dir)
 {
     const char *newpath;
     const char *ourdir = dir;
-    if (apr_filepath_root(&newpath, &dir, 0, p) != APR_SUCCESS
-            || strncmp(newpath, ourdir, 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, ourdir, strlen(newpath)) != 0) {
         return 0;
     }
     return 1;