diff options
| author | Tank_Master <tank.master@phoenixviewer.com> | 2014-01-18 10:56:00 -0800 |
|---|---|---|
| committer | Tank_Master <tank.master@phoenixviewer.com> | 2014-01-18 10:56:00 -0800 |
| commit | 091185b057d312e05f6b7ec7d03a37dec0879adf (patch) | |
| tree | 48d4d4b4d3c1b02e40f9b029cf65bb200687f087 /indra/llplugin/llplugincookiestore.cpp | |
| parent | a0ac409e8a4a822a55e9079b4a6d947af5edf220 (diff) | |
| parent | d8a81b240e828a8ab27709fb11038a4b5c4d5428 (diff) | |
Merge
Diffstat (limited to 'indra/llplugin/llplugincookiestore.cpp')
| -rwxr-xr-x[-rw-r--r--] | 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 100644..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++; + } + } +} |
