mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-08 13:13:49 -05:00
fix: don't pass empty parameters when making auth request (#69)
This commit is contained in:
@@ -17,8 +17,10 @@ pub fn parse_www_authenticate(www_auth: &str) -> String {
|
||||
.fold(String::new(), |acc, (key, value)| {
|
||||
if *key == "realm" {
|
||||
acc.to_owned() + value.as_escaped() + "?"
|
||||
} else {
|
||||
} else if value.unescaped_len() != 0 {
|
||||
format!("{}&{}={}", acc, key, value.as_escaped())
|
||||
} else {
|
||||
acc
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user