diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2013-10-28 20:06:18 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2013-10-28 20:06:18 -0400 |
| commit | 57040ea70e21ea5cfaedfd8a3506362a03562552 (patch) | |
| tree | eb9dc090ab72bea2353de8a940ccdc7ab69d830e /indra/llplugin/llplugincookiestore.cpp | |
| parent | 8881b47d22a7cd17824e8162e0658af71bbe3dea (diff) | |
| parent | d5877bc365292358eb4c9b8d14d1c8a1237ca5bd (diff) | |
Automated merge with http://bitbucket.org/nat_linden/viewer-maint-3331
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++; + } + } +} |
