Cookies are now expired immediately before each lookup

This commit is contained in:
Patrick Shaughnessy 2020-01-24 17:51:34 -05:00
parent 12693b51f5
commit 6d31827464
7 changed files with 16 additions and 70 deletions

View file

@ -291,6 +291,7 @@ impl ResourceChannelManager {
},
CoreResourceMsg::GetCookiesForUrl(url, consumer, source) => {
let mut cookie_jar = http_state.cookie_jar.write().unwrap();
cookie_jar.remove_expired_cookies_for_url(&url);
consumer
.send(cookie_jar.cookies_for_url(&url, source))
.unwrap();
@ -300,6 +301,7 @@ impl ResourceChannelManager {
},
CoreResourceMsg::GetCookiesDataForUrl(url, consumer, source) => {
let mut cookie_jar = http_state.cookie_jar.write().unwrap();
cookie_jar.remove_expired_cookies_for_url(&url);
let cookies = cookie_jar
.cookies_data_for_url(&url, source)
.map(Serde)