ben         98/05/02 11:44:07

  Modified:    src      CHANGES
               src/main http_request.c
               src/os/win32 util_win32.c
  Log:
  Make roots of filesystems work on Win32
  PR: 1558
  
  Revision  Changes    Path
  1.807     +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.806
  retrieving revision 1.807
  diff -u -r1.806 -r1.807
  --- CHANGES   1998/05/02 11:15:07     1.806
  +++ CHANGES   1998/05/02 18:44:04     1.807
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b7
   
  +  *) WIN32: Make roots of filesystems (e.g. c:/) work. [Ben Laurie]
  +     PR#1558
  +
     *) PORT: Various porting changes to support AIX 3.2, 4.1.5, 4.2 and 4.3.
        Additionally the checks for finding the vendor DSO library were moved
        from mod_so.c to Configure because first it needs $PLAT etc. and second
  
  
  
  1.120     +15 -0     apache-1.3/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_request.c,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- http_request.c    1998/04/13 18:05:11     1.119
  +++ http_request.c    1998/05/02 18:44:06     1.120
  @@ -177,11 +177,26 @@
       char *end = &path[strlen(path)];
       char *last_cp = NULL;
       int rv;
  +#ifdef WIN32
  +    char buf[5];
  +#endif
   
       if (r->finfo.st_mode) {
        /* assume path_info already set */
        return OK;
       }
  +
  +#ifdef WIN32
  +    /* If the path is x:/, then convert it to x:/., coz that's what stat 
needs to work properly */
  +    if(strlen(path) == 3)
  +     {
  +     strcpy(buf,path);
  +     buf[3]='.';
  +     buf[4]='\0';
  +     path=buf;
  +     end=buf+4;
  +     }
  +#endif
   
       /* Advance over trailing slashes ... NOT part of filename */
   
  
  
  
  1.14      +1 -1      apache-1.3/src/os/win32/util_win32.c
  
  Index: util_win32.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/os/win32/util_win32.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- util_win32.c      1998/04/13 18:05:21     1.13
  +++ util_win32.c      1998/05/02 18:44:07     1.14
  @@ -61,7 +61,7 @@
       sub_canonical_filename(buf, szFile);
       buf[0]=tolower(buf[0]);
   
  -    if (*szFile && szFile[strlen(szFile)-1] == '/')
  +    if (*szFile && szFile[strlen(szFile)-1] == '/' && buf[strlen(buf)-1] != 
'/')
           strcat(buf, "/");
   
       return ap_pstrdup(pPool, buf);
  
  
  

Reply via email to