fix bug 32895 [Converting \ to / in urls on windows only (was: RFC 2396 $2.4.3 non-compliance?)] We no longer convert \ to / inside the core urlparser on windows only. Conversion from filepath to url still does. r=dougt@netscape.com sr=darin@netscape.com

git-svn-id: svn://10.0.0.236/trunk@104736 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
andreas.otte%primus-online.de
2001-10-06 12:08:44 +00:00
parent f98fa06492
commit 54069551f0
2 changed files with 4 additions and 12 deletions

View File

@@ -91,7 +91,6 @@ DupString(char* *o_Dest, const char* i_Src)
}
// Replace all /./ with a /
// Also changes all \ to /
// But only till #?
NS_NET void
CoaleseDirs(char* io_Path)
@@ -119,13 +118,7 @@ CoaleseDirs(char* io_Path)
}
#endif
#if defined(XP_WIN) || defined(XP_OS2)
if (*fwdPtr == '\\')
*fwdPtr = '/';
#endif
if (*fwdPtr == '/' && *(fwdPtr+1) == '.' &&
(*(fwdPtr+2) == '/' || *(fwdPtr+2) == '\\'))
if (*fwdPtr == '/' && *(fwdPtr+1) == '.' && *(fwdPtr+2) == '/' )
{
// remove . followed by slash
fwdPtr += 1;
@@ -134,8 +127,7 @@ CoaleseDirs(char* io_Path)
(*(fwdPtr+3) == '/' ||
*(fwdPtr+3) == '\0' || // This will take care of
*(fwdPtr+3) == '?' || // something like foo/bar/..#sometag
*(fwdPtr+3) == '#' ||
*(fwdPtr+3) == '\\'))
*(fwdPtr+3) == '#'))
{
// remove foo/..
// reverse the urlPtr to the previous slash