Return not found when a cookie is empty

This commit is contained in:
Valentin Tolmer 2021-05-30 17:01:14 +02:00
parent 3f23f69fce
commit 6ebd18d1e0

View File

@ -39,7 +39,11 @@ pub fn get_cookie(cookie_name: &str) -> Result<Option<String>> {
.filter_map(|c| c.split_once('='))
.find_map(|(name, value)| {
if name == cookie_name {
if value.is_empty() {
None
} else {
Some(value.to_string())
}
} else {
None
}