You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Alberto Massari <am...@progress.com> on 2004/10/30 00:15:17 UTC
Re: [jira] Resolved: (XERCESC-1296) Trying to parse XML
document which has https in its url
Hi James,
At 15.00 29/10/2004 -0700, James Berry wrote:
>Hey Alberto,
>
>Does Xerces actually enforce this restriction, or is it up to the
>netaccessor? I think the netaccessor on the Mac would actually support
>some of the other url types (like ftp and https) if they were passed in.
>Just a wild question. It would be interesting, too, I believe, to write a
>netaccessor based on libcurl, which would give us access to a broad
>variety of url types.
It's the NetAccessor; libWWW, WinSock and Socket only test for XMLUrl::HTTP
as protocol:
BinInputStream* WinSockNetAccessor::makeNew(const XMLURL& urlSource, const
XMLNetHTTPInfo* httpInfo /*=0*/)
{
XMLURL::Protocols protocol = urlSource.getProtocol();
switch(protocol)
{
case XMLURL::HTTP:
{
BinHTTPURLInputStream* retStrm =
new (urlSource.getMemoryManager())
BinHTTPURLInputStream(urlSource, httpInfo);
return retStrm;
break;
}
//
// These are the only protocols we support now. So throw and
// unsupported protocol exception for the others.
//
default :
ThrowXMLwithMemMgr(MalformedURLException,
XMLExcepts::URL_UnsupportedProto, urlSource.getMemoryManager());
break;
}
return 0;
}
The Mac-specific ones instead don't do this test and simply pass the URL to
the OS APIs.
There is already a bug that I would like to tackle soon, that asks for a
WinInet-based NetAccessor for Windows that would support a lot more
protocols, including http, https, ftp. The downside is that WinInet is
considered a desktop technology, not really suitable for creating services;
a better API would be WinHTTP.
BTW, what is libcurl?
Alberto
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
RE: [jira] Resolved: (XERCESC-1296) Trying to parse XML document which has https in its url
Posted by Scott Cantor <ca...@osu.edu>.
> I think libcurl would make a great netaccessor base, at least for
> unixes and Mac OX X, where libcurl is apt to be present anyway. It
> might make sense for Windows, through we'd then has an external
> dependency to resolve.
+1. I use it extensively.
-- Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: [jira] Resolved: (XERCESC-1296) Trying to parse XML document which has https in its url
Posted by James Berry <ja...@jberry.us>.
On Oct 29, 2004, at 3:15 PM, Alberto Massari wrote:
> BTW, what is libcurl?
libcurl is the library that underlies the ubiquitous curl command line
tool commonly used on unixes but which compiles on other platforms as
well, including Windows.
curl (http://curl.haxx.se/) supports all kinds of protocols, and is
distributed under a very liberal free software license that doesn't put
any restrictions on use, apart from maintaining their copyright.
I think libcurl would make a great netaccessor base, at least for
unixes and Mac OX X, where libcurl is apt to be present anyway. It
might make sense for Windows, through we'd then has an external
dependency to resolve.
-jdb
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org