]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Already committed in similar form to Apache 1.3.22-dev, this patch allows
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 16 Oct 2001 23:49:25 +0000 (23:49 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 16 Oct 2001 23:49:25 +0000 (23:49 +0000)
  Win32/OS2/Netware paths to work with mod_vhost_alias.

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

modules/mappers/mod_vhost_alias.c

index 12ad0ddcd67b92cd99c9bf1ec357b935ee992272..00b4e208f10fa34c94d8145808086f5ee35c9a52 100644 (file)
@@ -193,9 +193,9 @@ static const char *vhost_alias_set(cmd_parms *cmd, void *dummy, const char *map)
        return "INTERNAL ERROR: unknown command info";
     }
 
-    if (*map != '/') {
+    if (!ap_os_is_path_absolute(cmd->pool, map)) {
        if (strcasecmp(map, "none")) {
-           return "format string must start with '/' or be 'none'";
+           return "format string must be an absolute path, or 'none'";
        }
        *pmap = NULL;
        *pmode = VHOST_ALIAS_NONE;
@@ -413,6 +413,7 @@ static void vhost_alias_interpolate(request_rec *r, const char *name,
     if (last == '/') {
        ++uri;
     }
+
     if (r->filename) {
        r->filename = apr_pstrcat(r->pool, r->filename, buf, uri, NULL);
     }
@@ -461,6 +462,12 @@ static int mva_translate(request_rec *r)
        return DECLINED;
     }
 
+    /* ### There is an optimization available here to determine the
+     * absolute portion of the path from the server config phase, 
+     * through the first % segment, and note that portion of the path
+     * canonical_path buffer.
+     */
+    r->canonical_filename = "";
     vhost_alias_interpolate(r, name, map, uri);
 
     if (cgi) {