Evict HSTS entries when a max-age of 0 is seen

This commit is contained in:
Sam Gibson 2015-06-23 16:00:30 -07:00
parent 690ac636eb
commit ff1777e446
2 changed files with 12 additions and 1 deletions

View file

@ -214,7 +214,7 @@ impl HSTSEntry {
pub fn is_expired(&self) -> bool {
match (self.max_age, self.timestamp) {
(Some(max_age), Some(timestamp)) => {
(time::get_time().sec as u64) - timestamp > max_age
(time::get_time().sec as u64) - timestamp >= max_age
},
_ => false