mirror of
https://github.com/nitnelave/lldap.git
synced 2023-04-12 14:25:13 +00:00
Return not found when a cookie is empty
This commit is contained in:
parent
3f23f69fce
commit
6ebd18d1e0
@ -39,7 +39,11 @@ pub fn get_cookie(cookie_name: &str) -> Result<Option<String>> {
|
|||||||
.filter_map(|c| c.split_once('='))
|
.filter_map(|c| c.split_once('='))
|
||||||
.find_map(|(name, value)| {
|
.find_map(|(name, value)| {
|
||||||
if name == cookie_name {
|
if name == cookie_name {
|
||||||
Some(value.to_string())
|
if value.is_empty() {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
Some(value.to_string())
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user