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:48:06 UTC
svn commit: r239971 - /xerces/c/trunk/src/xercesc/util/XMLUri.cpp
Author: cargilld
Date: Wed Aug 24 17:48:05 2005
New Revision: 239971
URL: http://svn.apache.org/viewcvs?rev=239971&view=rev
Log:
Fix for xercesc-896.
Modified:
xerces/c/trunk/src/xercesc/util/XMLUri.cpp
Modified: xerces/c/trunk/src/xercesc/util/XMLUri.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/util/XMLUri.cpp?rev=239971&r1=239970&r2=239971&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLUri.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLUri.cpp Wed Aug 24 17:48:05 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