mirror of
https://github.com/ViViDboarder/bitwarden_rs.git
synced 2024-11-22 13:16:39 +00:00
Some small changes on the iter of the cookies
This commit is contained in:
parent
5016e30cf2
commit
bc461d9baa
@ -167,10 +167,10 @@ fn get_icon_url(domain: &str) -> Result<(String, String), Error> {
|
|||||||
// Extract the URL from the respose in case redirects occured (like @ gitlab.com)
|
// Extract the URL from the respose in case redirects occured (like @ gitlab.com)
|
||||||
let url = content.url().clone();
|
let url = content.url().clone();
|
||||||
let raw_cookies = content.headers().get_all("set-cookie");
|
let raw_cookies = content.headers().get_all("set-cookie");
|
||||||
raw_cookies.iter().for_each(|raw_cookie| {
|
cookie_str = raw_cookies.iter().map(|raw_cookie| {
|
||||||
let cookie = Cookie::parse(raw_cookie.to_str().unwrap_or_default()).unwrap();
|
let cookie = Cookie::parse(raw_cookie.to_str().unwrap_or_default()).unwrap();
|
||||||
cookie_str.push_str(&format!("{}={}; ", cookie.name(), cookie.value()));
|
format!("{}={}; ", cookie.name(), cookie.value())
|
||||||
});
|
}).collect::<String>();
|
||||||
|
|
||||||
// Add the default favicon.ico to the list with the domain the content responded from.
|
// Add the default favicon.ico to the list with the domain the content responded from.
|
||||||
iconlist.push(IconList { priority: 35, href: url.join("/favicon.ico").unwrap().into_string() });
|
iconlist.push(IconList { priority: 35, href: url.join("/favicon.ico").unwrap().into_string() });
|
||||||
|
Loading…
Reference in New Issue
Block a user