marc        98/07/12 19:44:26

  Modified:    src/main http_core.c
  Log:
  Canonicalize ServerRoot _before_ checking if it is a directory.
  Fixes problem where paths without a directory were rejected with
  a horrible error on Win32.
  
  Revision  Changes    Path
  1.211     +4 -1      apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.210
  retrieving revision 1.211
  diff -u -r1.210 -r1.211
  --- http_core.c       1998/07/10 05:44:46     1.210
  +++ http_core.c       1998/07/13 02:44:24     1.211
  @@ -1680,14 +1680,17 @@
   static const char *set_server_root(cmd_parms *cmd, void *dummy, char *arg) 
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
  +
       if (err != NULL) {
           return err;
       }
   
  +    arg = ap_os_canonical_filename(cmd->pool, arg);
  +
       if (!ap_is_directory(arg)) {
           return "ServerRoot must be a valid directory";
       }
  -    ap_cpystrn(ap_server_root, ap_os_canonical_filename(cmd->pool, arg),
  +    ap_cpystrn(ap_server_root, arg,
               sizeof(ap_server_root));
       return NULL;
   }
  
  
  

Reply via email to