aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/websocket_loader.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2020-01-25 08:48:27 -0500
committerGitHub <noreply@github.com>2020-01-25 08:48:27 -0500
commitf3e6351e472bdbc3b574a7734437c9f8cd1b60cc (patch)
tree273a262008942347ab5a1db5f41921d64a34e735 /components/net/websocket_loader.rs
parent53879945a9ee3a3c74d36af791bb52d95fd93366 (diff)
parent6d31827464fb4eb18dfd891fcedfd40fb955aae8 (diff)
downloadservo-f3e6351e472bdbc3b574a7734437c9f8cd1b60cc.tar.gz
servo-f3e6351e472bdbc3b574a7734437c9f8cd1b60cc.zip
Auto merge of #25598 - pshaughn:cookieexpire, r=jdm
Expire cookies on lookup <!-- Please describe your changes on the following line: --> Cookies were rarely, if ever, expiring; this caused tests that used max-age=0 as a cookie deletion method to have cookies they shouldn't have had. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #24911 <!-- Either: --> - [X] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/net/websocket_loader.rs')
-rw-r--r--components/net/websocket_loader.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/components/net/websocket_loader.rs b/components/net/websocket_loader.rs
index 76dccfc2270..93bb031dca8 100644
--- a/components/net/websocket_loader.rs
+++ b/components/net/websocket_loader.rs
@@ -70,6 +70,7 @@ impl<'a> Handler for Client<'a> {
}
let mut cookie_jar = self.http_state.cookie_jar.write().unwrap();
+ cookie_jar.remove_expired_cookies_for_url(self.resource_url);
if let Some(cookie_list) = cookie_jar.cookies_for_url(self.resource_url, CookieSource::HTTP)
{
req.headers_mut()