From d9c5d6d653d9af5719b80c5cff4874bab14572c3 Mon Sep 17 00:00:00 2001 From: cantor Date: Tue, 24 Aug 2010 02:02:59 +0000 Subject: [PATCH] https://bugs.internet2.edu/jira/browse/SSPCPP-297 git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@3306 cb58f699-b61c-0410-a6fe-9272a202ed29 --- shibsp/SPConfig.cpp | 13 ++++++++++++- shibsp/binding/impl/SOAPClient.cpp | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/shibsp/SPConfig.cpp b/shibsp/SPConfig.cpp index 44240f2..066bee1 100644 --- a/shibsp/SPConfig.cpp +++ b/shibsp/SPConfig.cpp @@ -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" @@ -58,11 +59,13 @@ # include "metadata/MetadataExt.h" # include "security/PKIXTrustEngine.h" # include "security/SecurityPolicyProvider.h" +# include # include #endif #include #include +#include #include #include #include @@ -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; diff --git a/shibsp/binding/impl/SOAPClient.cpp b/shibsp/binding/impl/SOAPClient.cpp index c04ff52..59f72b1 100644 --- a/shibsp/binding/impl/SOAPClient.cpp +++ b/shibsp/binding/impl/SOAPClient.cpp @@ -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); } } -- 2.1.4