https://bugs.internet2.edu/jira/browse/SSPCPP-297
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 24 Aug 2010 02:02:59 +0000 (02:02 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 24 Aug 2010 02:02:59 +0000 (02:02 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@3306 cb58f699-b61c-0410-a6fe-9272a202ed29

shibsp/SPConfig.cpp
shibsp/binding/impl/SOAPClient.cpp

index 44240f2..066bee1 100644 (file)
@@ -35,8 +35,9 @@
 # error "No supported logging library."
 #endif
 
-#include "AccessControl.h"
 #include "exceptions.h"
+#include "version.h"
+#include "AccessControl.h"
 #include "RequestMapper.h"
 #include "ServiceProvider.h"
 #include "SessionCache.h"
 # include "metadata/MetadataExt.h"
 # include "security/PKIXTrustEngine.h"
 # include "security/SecurityPolicyProvider.h"
+# include <saml/version.h>
 # include <saml/SAMLConfig.h>
 #endif
 
 #include <ctime>
 #include <xercesc/util/XMLUniDefs.hpp>
+#include <xmltooling/version.h>
 #include <xmltooling/XMLToolingConfig.h>
 #include <xmltooling/util/NDC.h>
 #include <xmltooling/util/ParserPool.h>
@@ -184,11 +187,19 @@ bool SPConfig::init(const char* catalog_path, const char* inst_prefix)
     XMLToolingConfig::getConfig().catalog_path = catalog_path;
 
 #ifndef SHIBSP_LITE
+    XMLToolingConfig::getConfig().user_agent = string(PACKAGE_NAME) + '/' + PACKAGE_VERSION +
+        " OpenSAML/" + OPENSAML_FULLVERSIONDOT +
+        " XMLTooling/" + XMLTOOLING_FULLVERSIONDOT +
+        " XML-Security-C/" + XSEC_FULLVERSIONDOT +
+        " Xerces-C/" + XERCES_FULLVERSIONDOT;
     if (!SAMLConfig::getConfig().init()) {
         log.fatal("failed to initialize OpenSAML library");
         return false;
     }
 #else
+    XMLToolingConfig::getConfig().user_agent = string(PACKAGE_NAME) + '/' + PACKAGE_VERSION +
+        " XMLTooling/" + XMLTOOLING_FULLVERSIONDOT +
+        " Xerces-C/" + XERCES_FULLVERSIONDOT;
     if (!XMLToolingConfig::getConfig().init()) {
         log.fatal("failed to initialize XMLTooling library");
         return false;
index c04ff52..59f72b1 100644 (file)
@@ -187,7 +187,6 @@ void SOAPClient::prepareTransport(SOAPTransport& transport)
     if (http) {
         flag = m_relyingParty->getBool("chunkedEncoding");
         http->useChunkedEncoding(flag.first && flag.second);
-        http->setRequestHeader("User-Agent", PACKAGE_NAME);
         http->setRequestHeader(PACKAGE_NAME, PACKAGE_VERSION);
     }
 }