dbertoni 00/06/27 09:28:33
Modified: c/src/PlatformSupport URISupport.cpp
Log:
Fixed code so base URI with no path is ignored.
Revision Changes Path
1.5 +14 -1 xml-xalan/c/src/PlatformSupport/URISupport.cpp
Index: URISupport.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/URISupport.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- URISupport.cpp 2000/06/05 00:50:51 1.4
+++ URISupport.cpp 2000/06/27 16:28:32 1.5
@@ -149,10 +149,16 @@
const unsigned int indexOfSlash = theContextLength == 0 ? 0 :
lastIndexOf(context, '/');
+ bool hasPath = true;
+
if (indexOfSlash < theContextLength)
{
context = substring(context, 0, indexOfSlash + 1);
}
+ else
+ {
+ hasPath = false;
+ }
// OK, now let's look at the urlString...
@@ -170,7 +176,14 @@
context = substring(context, 0, indexOfSlash + 1);
}
- context += urlString;
+ if (hasPath == true)
+ {
+ context += urlString;
+ }
+ else
+ {
+ context = urlString;
+ }
}
else
{