Adds control message for HSTS headers

This commit is contained in:
Sam Gibson 2015-06-24 11:30:08 -07:00
parent f284181781
commit 795454fb81
2 changed files with 9 additions and 0 deletions

View file

@ -366,6 +366,13 @@ impl ResourceChannelManager {
ControlMsg::GetCookiesForUrl(url, consumer, source) => {
consumer.send(self.resource_manager.cookie_storage.cookies_for_url(&url, source)).unwrap();
}
ControlMsg::SetHSTSEntryForHost(host, include_subdomains, max_age) => {
match HSTSEntry::new(host, include_subdomains, max_age) {
Some(entry) => self.resource_manager.add_hsts_entry(entry),
/// Invalid entries (e.g. IP's don't matter)
None => ()
}
}
ControlMsg::Exit => {
break
}