You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ca...@apache.org on 2005/08/25 02:44:13 UTC

svn commit: r239970 - /xerces/c/branches/xerces-2.7/src/xercesc/util/XMLUri.cpp

Author: cargilld
Date: Wed Aug 24 17:44:11 2005
New Revision: 239970

URL: http://svn.apache.org/viewcvs?rev=239970&view=rev
Log:
Fix for xercesc-896.

Modified:
    xerces/c/branches/xerces-2.7/src/xercesc/util/XMLUri.cpp

Modified: xerces/c/branches/xerces-2.7/src/xercesc/util/XMLUri.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/util/XMLUri.cpp?rev=239970&r1=239969&r2=239970&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/util/XMLUri.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/util/XMLUri.cpp Wed Aug 24 17:44:11 2005
@@ -427,15 +427,13 @@
 	int index = 0;
 	bool foundScheme = false;
 
-	// Check for scheme, which must be before `/', '?' or '#'. 
-	// Also handle names with DOS drive letters ('D:'), 
-	// so 1-character schemes are not allowed.
+	// Check for scheme, which must be before `/', '?' or '#'. 	
         int colonIdx = XMLString::indexOf(trimmedUriSpec, chColon);
         int slashIdx = XMLString::indexOf(trimmedUriSpec, chForwardSlash);
         int queryIdx = XMLString::indexOf(trimmedUriSpec, chQuestion);
         int fragmentIdx = XMLString::indexOf(trimmedUriSpec, chPound);
 
-        if ((colonIdx < 2) ||
+        if ((colonIdx == 0) ||
             (colonIdx > slashIdx && slashIdx != -1) ||
             (colonIdx > queryIdx && queryIdx != -1) ||
             (colonIdx > fragmentIdx && fragmentIdx != -1))
@@ -2048,15 +2046,13 @@
     int index = 0;
     bool foundScheme = false;
 
-    // Check for scheme, which must be before `/', '?' or '#'. 
-    // Also handle names with DOS drive letters ('D:'), 
-    // so 1-character schemes are not allowed.
+    // Check for scheme, which must be before `/', '?' or '#'.     
     int colonIdx = XMLString::indexOf(trimmedUriSpec, chColon);
     int slashIdx = XMLString::indexOf(trimmedUriSpec, chForwardSlash);
     int queryIdx = XMLString::indexOf(trimmedUriSpec, chQuestion);
     int fragmentIdx = XMLString::indexOf(trimmedUriSpec, chPound);
 
-    if ((colonIdx < 2) ||
+    if ((colonIdx == 0) ||
         (colonIdx > slashIdx && slashIdx != -1) ||
         (colonIdx > queryIdx && queryIdx != -1) ||
         (colonIdx > fragmentIdx && fragmentIdx != -1))
@@ -2150,15 +2146,13 @@
     int index = 0;
     bool foundScheme = false;
 
-    // Check for scheme, which must be before `/', '?' or '#'. 
-    // Also handle names with DOS drive letters ('D:'), 
-    // so 1-character schemes are not allowed.
+    // Check for scheme, which must be before `/', '?' or '#'.     
     int colonIdx = XMLString::indexOf(trimmedUriSpec, chColon);
     int slashIdx = XMLString::indexOf(trimmedUriSpec, chForwardSlash);
     int queryIdx = XMLString::indexOf(trimmedUriSpec, chQuestion);
     int fragmentIdx = XMLString::indexOf(trimmedUriSpec, chPound);
 
-    if ((colonIdx < 2) ||
+    if ((colonIdx == 0) ||
         (colonIdx > slashIdx && slashIdx != -1) ||
         (colonIdx > queryIdx && queryIdx != -1) ||
         (colonIdx > fragmentIdx && fragmentIdx != -1))



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org