You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bn...@apache.org on 2002/02/09 00:29:59 UTC
cvs commit: apache-1.3/src/os/netware os.c
bnicholes 02/02/08 15:29:59
Modified: src/os/netware os.c
Log:
Only lower case the canonical name on a call to ap_os_canonical_filename()
if ap_os_case_canonical_filename() fails to retieve the information from the
file system, at least we have the casing from the request.
Revision Changes Path
1.23 +12 -4 apache-1.3/src/os/netware/os.c
Index: os.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/os/netware/os.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- os.c 4 Feb 2002 22:26:28 -0000 1.22
+++ os.c 8 Feb 2002 23:29:59 -0000 1.23
@@ -162,7 +162,7 @@
NetWare assumes that all physical paths are fully qualified.
Each file path must include a volume name.
*/
-char *ap_os_canonical_filename(pool *pPool, const char *szFile)
+static char *os_canonical_filename(pool *pPool, const char *szFile)
{
char *pNewName = ap_pstrdup(pPool, szFile);
char *slash_test;
@@ -189,6 +189,14 @@
pNewName = ap_pstrcat (pPool, vol, "/", pNewName+strlen(vol), NULL);
}
}
+ return pNewName;
+}
+
+char *ap_os_canonical_filename(pool *pPool, const char *szFile)
+{
+ char *pNewName = os_canonical_filename(pPool, szFile);
+
+ /* Lower case the name so that the interal string compares work */
strlwr(pNewName);
return pNewName;
}
@@ -198,7 +206,7 @@
{
/* First thing we need to do is get a copy of the
canonicalized path */
- char *pNewName = ap_os_canonical_filename(pPool, szFile);
+ char *pNewName = os_canonical_filename(pPool, szFile);
int volnum=0;
long dirnum=0;
long pathcount=0;
@@ -230,8 +238,8 @@
pNewName = ap_pstrcat (pPool, &(vol[1]), ":", path, NULL);
}
- /* At this point we either have a real case accurate path or
- our best guess whichis a lower cased path */
+ /* At this point we either have a real case accurate canonical path or
+ the original name canonicalized */
return pNewName;
}