httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-1.3/src/main http_core.c
Date Tue, 26 Sep 2000 02:59:00 GMT
wrowe       00/09/25 19:59:00

  Modified:    src/main http_core.c
  Log:
    Based on Brian's and my observations, the <Directory '/'> default root
    patch should now be complete for WIN32, OS2 and NETWARE.
    Still some disagreement if '/' is canonical for Win32/OS2, but we will
    thrash that out.
  
  Revision  Changes    Path
  1.285     +23 -1     apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.284
  retrieving revision 1.285
  diff -u -r1.284 -r1.285
  --- http_core.c	2000/09/24 20:07:00	1.284
  +++ http_core.c	2000/09/26 02:58:59	1.285
  @@ -368,10 +368,20 @@
    * See directory_walk().
    */
   
  -#ifdef HAVE_DRIVE_LETTERS
  +#if defined(HAVE_DRIVE_LETTERS)
   #define IS_SPECIAL(entry_core)	\
       ((entry_core)->r != NULL \
   	|| ((entry_core)->d[0] != '/' && (entry_core)->d[1] != ':'))
  +#elif defined(NETWARE)
  +/* XXX: Fairly certain this is correct... '/' must prefix the path
  + *      or else in the case xyz:/ or abc/xyz:/, '/' must follow the ':'.
  + *      If there is no leading '/' or embedded ':/', then we are special.
  + */
  +#define IS_SPECIAL(entry_core)	\
  +    ((entry_core)->r != NULL \
  +	|| ((entry_core)->d[0] != '/' 
  +            && strchr((entry_core)->d, ':')
  +            && *(strchr((entry_core)->d, ':') + 1) != '/'))
   #else
   #define IS_SPECIAL(entry_core)	\
       ((entry_core)->r != NULL || (entry_core)->d[0] != '/')
  @@ -1449,6 +1459,18 @@
   	cmd->path = ap_getword_conf(cmd->pool, &arg);
   	r = ap_pregcomp(cmd->pool, cmd->path, REG_EXTENDED|USE_ICASE);
       }
  +#if defined(HAVE_DRIVE_LETTERS) || defined(NETWARE)
  +    else if (strcmp(cmp->path, "/") == 0) {
  +        /* Treat 'default' path / as an inalienable root */
  +        cmd->path = ap_pstrdup(cmd->pool, cmd->path);
  +    }
  +#endif
  +#if defined(HAVE_UNC_PATHS)
  +    else if (strcmp(cmp->path, "//") == 0) {
  +        /* Treat UNC path // as an inalienable root */
  +        cmd->path = ap_pstrdup(cmd->pool, cmd->path);
  +    }
  +#endif
       else {
   	/* Ensure that the pathname is canonical */
   	cmd->path = ap_os_canonical_filename(cmd->pool, cmd->path);
  
  
  

Mime
View raw message