diff options
author | dolphin <dolphin@lindenlab.com> | 2013-10-25 09:52:31 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2013-10-25 09:52:31 -0700 |
commit | 7bbb802385e58b1f9c2e7b04ad2f3f20c125be44 (patch) | |
tree | 88ccb7d4cc17bb9615ee61ef001f8cb8963252fb /indra/llplugin/llplugincookiestore.cpp | |
parent | a6faeac94530e59d2c2a56df63a1d78e00fb0247 (diff) | |
parent | ea1e1b0925b386cf83178539b8eae9e25c573548 (diff) |
Merge with 3.6.9
Diffstat (limited to 'indra/llplugin/llplugincookiestore.cpp')
-rwxr-xr-x | indra/llplugin/llplugincookiestore.cpp | 28 |
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++; + } + } +} |