mirror of
https://github.com/lldap/lldap.git
synced 2026-06-29 03:43:33 +00:00
Return not found when a cookie is empty
This commit is contained in:
@@ -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 {
|
||||
Some(value.to_string())
|
||||
if value.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(value.to_string())
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user