return values.size();
}
-const char* AbstractSPRequest::getCookie(const char* name) const
-{
- if (m_cookieMap.empty()) {
- string cookies=getHeader("Cookie");
-
- string::size_type pos=0,cname,namelen,val,vallen;
- while (pos !=string::npos && pos < cookies.length()) {
- while (isspace(cookies[pos])) pos++;
- cname=pos;
- pos=cookies.find_first_of("=",pos);
- if (pos == string::npos)
- break;
- namelen=pos-cname;
- pos++;
- if (pos==cookies.length())
- break;
- val=pos;
- pos=cookies.find_first_of(";",pos);
- if (pos != string::npos) {
- vallen=pos-val;
- pos++;
- m_cookieMap.insert(make_pair(cookies.substr(cname,namelen),cookies.substr(val,vallen)));
- }
- else
- m_cookieMap.insert(make_pair(cookies.substr(cname,namelen),cookies.substr(val)));
- }
- }
- map<string,string>::const_iterator lookup=m_cookieMap.find(name);
- return (lookup==m_cookieMap.end()) ? NULL : lookup->second.c_str();
-}
-
const char* AbstractSPRequest::getHandlerURL(const char* resource) const
{
if (!resource)
std::vector<const char*>::size_type getParameters(const char* name, std::vector<const char*>& values) const;
- const char* getCookie(const char* name) const;
-
const char* getHandlerURL(const char* resource=NULL) const;
void log(SPLogLevel level, const std::string& msg) const;
mutable std::string m_url;
void* m_log; // declared void* to avoid log4cpp header conflicts in Apache
mutable std::string m_handlerURL;
- mutable std::map<std::string,std::string> m_cookieMap;
mutable CGIParser* m_parser;
};
}
}
-void SHIBSP_API shibsp::registerSessionCaches()\r
-{\r
- SPConfig::getConfig().SessionCacheManager.registerFactory(STORAGESERVICE_SESSION_CACHE, StorageServiceCacheFactory);\r
-}\r
+void SHIBSP_API shibsp::registerSessionCaches()
+{
+ SPConfig::getConfig().SessionCacheManager.registerFactory(STORAGESERVICE_SESSION_CACHE, StorageServiceCacheFactory);
+}
void StoredSession::unmarshallAttributes() const
{
#endif
m_root(e), m_inprocTimeout(900), m_lock(NULL), shutdown(false), shutdown_wait(NULL), cleanup_thread(NULL)
{
- static const XMLCh cacheTimeout[] = UNICODE_LITERAL_12(c,a,c,h,e,T,i,m,e,o,u,t);\r
- static const XMLCh inprocTimeout[] = UNICODE_LITERAL_13(i,n,p,r,o,c,T,i,m,e,o,u,t);\r
+ static const XMLCh cacheTimeout[] = UNICODE_LITERAL_12(c,a,c,h,e,T,i,m,e,o,u,t);
+ static const XMLCh inprocTimeout[] = UNICODE_LITERAL_13(i,n,p,r,o,c,T,i,m,e,o,u,t);
static const XMLCh _StorageService[] = UNICODE_LITERAL_14(S,t,o,r,a,g,e,S,e,r,v,i,c,e);
SPConfig& conf = SPConfig::getConfig();
inproc = conf.isEnabled(SPConfig::InProcess);
if (e) {
- const XMLCh* tag=e->getAttributeNS(NULL,cacheTimeout);\r
- if (tag && *tag) {\r
- m_cacheTimeout = XMLString::parseInt(tag);\r
- if (!m_cacheTimeout)\r
- m_cacheTimeout=3600;\r
- }\r
+ const XMLCh* tag=e->getAttributeNS(NULL,cacheTimeout);
+ if (tag && *tag) {
+ m_cacheTimeout = XMLString::parseInt(tag);
+ if (!m_cacheTimeout)
+ m_cacheTimeout=3600;
+ }
if (inproc) {
- const XMLCh* tag=e->getAttributeNS(NULL,inprocTimeout);\r
- if (tag && *tag) {\r
- m_inprocTimeout = XMLString::parseInt(tag);\r
- if (!m_inprocTimeout)\r
- m_inprocTimeout=900;\r
- }\r
+ const XMLCh* tag=e->getAttributeNS(NULL,inprocTimeout);
+ if (tag && *tag) {
+ m_inprocTimeout = XMLString::parseInt(tag);
+ if (!m_inprocTimeout)
+ m_inprocTimeout=900;
+ }
}
}