You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2001/10/11 01:16:46 UTC
cvs commit: xml-xerces/c/src/util XMLURL.cpp
jasons 01/10/10 16:16:46
Modified: c/src/util XMLURL.cpp
Log:
XMLURL::parse now throws an exception if it sees a an http URL without
two forward slashes ('//') following the protocol
Revision Changes Path
1.20 +16 -1 xml-xerces/c/src/util/XMLURL.cpp
Index: XMLURL.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLURL.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- XMLURL.cpp 2001/10/09 12:24:05 1.19
+++ XMLURL.cpp 2001/10/10 23:16:46 1.20
@@ -55,7 +55,7 @@
*/
/*
- * $Id: XMLURL.cpp,v 1.19 2001/10/09 12:24:05 tng Exp $
+ * $Id: XMLURL.cpp,v 1.20 2001/10/10 23:16:46 jasons Exp $
*/
@@ -945,6 +945,21 @@
srcPtr += XMLString::stringLen(fHost);
}
}
+ }
+ else
+ {
+ //
+ // http protocol requires two forward slashes
+ // we didn't get them, so throw an exception
+ //
+ if (fProtocol == HTTP) {
+ ThrowXML1
+ (
+ MalformedURLException
+ , XMLExcepts::URL_ExpectingTwoSlashes
+ , "Found 'http' protocol"
+ );
+ }
}
//
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org