From: Bradley Nicholes Date: Fri, 8 Feb 2002 23:29:59 +0000 (+0000) Subject: Only lower case the canonical name on a call to ap_os_canonical_filename() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6f96f1df1480f835b1c0ff11170e2958097a11e;p=thirdparty%2Fapache%2Fhttpd.git 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@93346 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/os/netware/os.c b/src/os/netware/os.c index 09cb2383d57..1ecb073ed99 100644 --- a/src/os/netware/os.c +++ b/src/os/netware/os.c @@ -162,7 +162,7 @@ void init_name_space() 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 @@ char *ap_os_canonical_filename(pool *pPool, const char *szFile) 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 @@ char *ap_os_case_canonical_filename(pool *pPool, const char *szFile) { /* 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 @@ char *ap_os_case_canonical_filename(pool *pPool, const char *szFile) 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; }