Author: jberry
Date: Tue May 31 20:43:31 2005
New Revision: 179344
URL: http://svn.apache.org/viewcvs?rev=179344&view=rev
Log:
Let curl decide what URL protocols are acceptable; we don't want to presume
Modified:
xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/NetAccessors/Curl/CurlNetAccessor.cpp
Modified:
xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/NetAccessors/Curl/CurlNetAccessor.cpp
URL:
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/NetAccessors/Curl/CurlNetAccessor.cpp?rev=179344&r1=179343&r2=179344&view=diff
==============================================================================
---
xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/NetAccessors/Curl/CurlNetAccessor.cpp
(original)
+++
xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/NetAccessors/Curl/CurlNetAccessor.cpp
Tue May 31 20:43:31 2005
@@ -81,25 +81,11 @@
BinInputStream*
CurlNetAccessor::makeNew(const XMLURL& urlSource, const XMLNetHTTPInfo*
httpInfo/*=0*/)
{
- XMLURL::Protocols protocol = urlSource.getProtocol();
- switch(protocol)
- {
- case XMLURL::HTTP:
- {
- CurlURLInputStream* retStrm =
- new (urlSource.getMemoryManager())
CurlURLInputStream(urlSource, httpInfo);
- return retStrm;
- }
-
- //
- // These are the only protocols we support now. So throw an
- // unsupported protocol exception for the others.
- //
- default :
- ThrowXMLwithMemMgr(MalformedURLException,
XMLExcepts::URL_UnsupportedProto, urlSource.getMemoryManager());
- break;
- }
- return 0;
+ // Just create a CurlURLInputStream
+ // We defer any checking of the url type for curl in CurlURLInputStream
+ CurlURLInputStream* retStrm =
+ new (urlSource.getMemoryManager())
CurlURLInputStream(urlSource, httpInfo);
+ return retStrm;
}
XERCES_CPP_NAMESPACE_END
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]