mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-25 22:55:55 -05:00
format string readability improvement
This commit is contained in:
parent
321c95a88c
commit
64d161d0a7
@ -126,13 +126,12 @@ pub fn run(args: Args) -> Result<i32, Error> {
|
||||
|
||||
fn curl_cookie(cookie: &str, flags: i32, domain: &str) -> String {
|
||||
format!(
|
||||
"{httponly}{domain}\t{tailmatch}\t{path}\t{secure}\t{expires}\t{name}\t{value}",
|
||||
"{httponly}{domain}\t{tailmatch}\t{path}\t{secure}\t{expires}\t{name}\t{cookie}",
|
||||
httponly = if (flags & SessionFlag::HttpOnly as i32) != 0 {
|
||||
"#HttpOnly_"
|
||||
} else {
|
||||
""
|
||||
},
|
||||
domain = domain,
|
||||
tailmatch = "FALSE",
|
||||
path = "/",
|
||||
secure = if (flags & SessionFlag::Secure as i32) != 0 {
|
||||
@ -142,7 +141,6 @@ fn curl_cookie(cookie: &str, flags: i32, domain: &str) -> String {
|
||||
},
|
||||
expires = "9223372036854775807", // 64-bit CURL_OFF_T_MAX, never expires
|
||||
name = "s",
|
||||
value = cookie
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user