More boostisms, add string tokenizer
[shibboleth/cpp-xmltooling.git] / xmltooling / io / HTTPRequest.cpp
index 10bc323..af790e9 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <boost/algorithm/string.hpp>
 #include <boost/bind.hpp>
+#include <boost/tokenizer.hpp>
 
 using namespace xmltooling;
 using namespace boost;
@@ -70,8 +71,8 @@ const char* HTTPRequest::getCookie(const char* name) const
 {
     if (m_cookieMap.empty()) {
         string cookies=getHeader("Cookie");
-        vector<string> nvpairs, nvpair;
-        split(nvpairs, cookies, is_any_of(";"), algorithm::token_compress_on);
+        vector<string> nvpair;
+        tokenizer< char_separator<char> > nvpairs(cookies, char_separator<char>(";"));
         for_each(nvpairs.begin(), nvpairs.end(), boost::bind(handle_cookie_fn, boost::ref(m_cookieMap), boost::ref(nvpair), _1));
     }
     map<string,string>::const_iterator lookup=m_cookieMap.find(name);