This commit is contained in:
Frank Denis 2023-02-09 16:58:58 +01:00
parent b5d525abcd
commit 651224d900
2 changed files with 4 additions and 7 deletions

View file

@ -433,7 +433,8 @@ impl DoH {
.header(
hyper::header::CACHE_CONTROL,
format!(
"max-age={ttl}, stale-if-error={STALE_IF_ERROR_SECS}, stale-while-revalidate={STALE_WHILE_REVALIDATE_SECS}"
"max-age={ttl}, stale-if-error={STALE_IF_ERROR_SECS}, \
stale-while-revalidate={STALE_WHILE_REVALIDATE_SECS}"
)
.as_str(),
);

View file

@ -29,9 +29,7 @@ where
let mut reader = BufReader::new(File::open(certs_path).map_err(|e| {
io::Error::new(
e.kind(),
format!(
"Unable to load the certificates [{certs_path_str}]: {e}"
),
format!("Unable to load the certificates [{certs_path_str}]: {e}"),
)
})?);
rustls_pemfile::certs(&mut reader).map_err(|_| {
@ -52,9 +50,7 @@ where
.map_err(|e| {
io::Error::new(
e.kind(),
format!(
"Unable to load the certificate keys [{certs_keys_path_str}]: {e}"
),
format!("Unable to load the certificate keys [{certs_keys_path_str}]: {e}"),
)
})?
.read_to_end(&mut encoded_keys)?;