SSPCPP-616 - clean up concatenated string literals
[shibboleth/cpp-sp.git] / shibsp / handler / impl / AttributeCheckerHandler.cpp
index da37277..d4b86a9 100644 (file)
@@ -40,6 +40,7 @@
 #include <boost/bind.hpp>
 #include <boost/scoped_ptr.hpp>
 #include <boost/algorithm/string.hpp>
+#include <xercesc/util/XMLUniDefs.hpp>
 #include <xmltooling/XMLToolingConfig.h>
 #include <xmltooling/util/PathResolver.h>
 #include <xmltooling/util/XMLHelper.h>
@@ -109,7 +110,7 @@ namespace shibsp {
 };
 
 AttributeCheckerHandler::AttributeCheckerHandler(const DOMElement* e, const char* appId)
-    : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT".AttributeCheckerHandler"), &g_Blocker)
+    : AbstractHandler(e, Category::getInstance(SHIBSP_LOGCAT ".AttributeCheckerHandler"), &g_Blocker)
 {
     if (!SPConfig::getConfig().isEnabled(SPConfig::InProcess))
         return;
@@ -122,6 +123,7 @@ AttributeCheckerHandler::AttributeCheckerHandler(const DOMElement* e, const char
 
     string attrs(XMLHelper::getAttrString(e, nullptr, attributes));
     if (!attrs.empty()) {
+        trim(attrs);
         split(m_attributes, attrs, is_space(), algorithm::token_compress_on);
         if (m_attributes.empty())
             throw ConfigurationException("AttributeChecker unable to parse attributes setting.");
@@ -185,7 +187,7 @@ pair<bool,long> AttributeCheckerHandler::run(SPRequest& request, bool isHandler)
     request.setResponseHeader("Expires","Wed, 01 Jan 1997 12:00:00 GMT");
     request.setResponseHeader("Cache-Control","private,no-store,no-cache,max-age=0");
 
-    ifstream infile(m_template);
+    ifstream infile(m_template.c_str());
     if (infile) {
         TemplateParameters tp(nullptr, request.getApplication().getPropertySet("Errors"), session);
         tp.m_request = &request;