Block http requests if transport authentication is required.
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Mon, 14 Jul 2008 19:15:12 +0000 (19:15 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Mon, 14 Jul 2008 19:15:12 +0000 (19:15 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@510 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/soap/impl/CURLSOAPTransport.cpp

index 4b278e3..0aca880 100644 (file)
@@ -412,6 +412,10 @@ void CURLSOAPTransport::send(istream& in)
     Category& log=Category::getInstance(XMLTOOLING_LOGCAT".SOAPTransport.CURL");
     Category& log_curl=Category::getInstance(XMLTOOLING_LOGCAT".libcurl");
 
+    // For this implementation, it's sufficient to check for https as a sign of transport security.
+    if (m_mandatory && !isConfidential())
+        throw IOException("Blocking unprotected HTTP request, transport authentication by server required.");
+
     string msg;
 
     // By this time, the handle has been prepared with the URL to use and the