summaryrefslogtreecommitdiff
path: root/indra/llplugin/llplugincookiestore.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2014-04-03 18:56:46 -0400
committerMonty Brandenberg <monty@lindenlab.com>2014-04-03 18:56:46 -0400
commitd7481cd07c3e0b5eed54ff6a3539406d09ed0669 (patch)
tree7e0d2a2a9733784f16518b977423deb225021651 /indra/llplugin/llplugincookiestore.cpp
parent076761a03d7cb8b53e6e3d4f2120091eabeba37a (diff)
parent31a3a3da5db077c4d9b8fe06a18de98c822db6ab (diff)
Merge. Refresh from viewer-release after 3.7.4 release.
Diffstat (limited to 'indra/llplugin/llplugincookiestore.cpp')
-rwxr-xr-xindra/llplugin/llplugincookiestore.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/llplugin/llplugincookiestore.cpp b/indra/llplugin/llplugincookiestore.cpp
index 82017ab3fa..9f4d65e723 100755
--- a/indra/llplugin/llplugincookiestore.cpp
+++ b/indra/llplugin/llplugincookiestore.cpp
@@ -87,6 +87,16 @@ std::string LLPluginCookieStore::Cookie::getKey() const
return result;
}
+std::string LLPluginCookieStore::Cookie::getDomain() const
+{
+ std::string result;
+ if(mDomainEnd > mDomainStart)
+ {
+ result += mCookie.substr(mDomainStart, mDomainEnd - mDomainStart);
+ }
+ return result;
+}
+
bool LLPluginCookieStore::Cookie::parse(const std::string &host)
{
bool first_field = true;
@@ -662,3 +672,21 @@ void LLPluginCookieStore::removeCookie(const std::string &key)
}
}
+void LLPluginCookieStore::removeCookiesByDomain(const std::string &domain)
+{
+ cookie_map_t::iterator iter = mCookies.begin();
+ while(iter != mCookies.end())
+ {
+ if(iter->second->getDomain() == domain)
+ {
+ cookie_map_t::iterator doErase = iter;
+ iter++;
+ delete doErase->second;
+ mCookies.erase(doErase);
+ }
+ else
+ {
+ iter++;
+ }
+ }
+}