You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/10/12 16:23:14 UTC
cvs commit: apache-2.0/src/os/os2 os-inline.c
wrowe 00/10/12 07:22:59
Modified: src/os/win32 os.h
src/os/os2 os-inline.c
Log:
Move more path parsing fixes forward from 1.3
Revision Changes Path
1.41 +5 -3 apache-2.0/src/os/win32/os.h
Index: os.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/os/win32/os.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- os.h 2000/10/11 04:24:40 1.40
+++ os.h 2000/10/12 14:21:30 1.41
@@ -137,10 +137,12 @@
__inline int ap_os_is_path_absolute(const char *file)
{
- /* For now, just do the same check that http_request.c and mod_alias.c
- * do.
+ /* For now, just do the same check that http_request.c and mod_alias.c do.
+ * XXX: Accept /bleh still? Or do we concur that d:/bleh is a minimum
+ * requirement? If so, canonical name needs to convert to drive/path
+ * syntax, and the test becomes (file[0] == '/' && file[1] == '/') ||...
*/
- return file[0] == '/' || file[1] == ':';
+ return file && (file[0] == '/' || (file[1] == ':' && file[2] == '/'));
}
/* OS-dependent filename routines in util_win32.c */
1.3 +5 -3 apache-2.0/src/os/os2/os-inline.c
Index: os-inline.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/os/os2/os-inline.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- os-inline.c 2000/03/31 09:17:13 1.2
+++ os-inline.c 2000/10/12 14:22:30 1.3
@@ -85,8 +85,10 @@
INLINE int ap_os_is_path_absolute(const char *file)
{
- /* For now, just do the same check that http_request.c and mod_alias.c
- * do.
+ /* For now, just do the same check that http_request.c and mod_alias.c do.
+ * XXX: Accept /bleh still? Or do we concur that d:/bleh is a minimum
+ * requirement? If so, canonical name needs to convert to drive/path
+ * syntax, and the test becomes (file[0] == '/' && file[1] == '/') ||...
*/
- return file && (file[0] == '/' || file[1] == ':');
+ return file && (file[0] == '/' || (file[1] == ':' && file[2] == '/'));
}