Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-2220

Winsock Network Accessor does not support https URLs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.2.3
    • None
    • Utilities
    • None
    • Windows 10
      MinGW 7.3.0 64-bit

    Description

      According to a comment from Xerces-C++/XERCESC-2029 only the curl and winsock network accessors support https URLs.

      While I got everything working on Linux using the curl accessor I cannot do so on Windows. I'm still getting the "unsupported protocol in URL" error even though I'm using the winsock accessor. 
      The problem appears to be that https has been deliberately disabled for the winsock accessor:

      Taken from src/xercesc/util/NetAccessors/WinSock/WinSockNetAccessor.cpp:

      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;
      }
      

      My understanding is that the winsock accessor should support https URLs so the question is why is https being disabled in WinSockNetAccessor?
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            FMeinicke Florian Meinicke
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: