From 1a0acbea4487a876fa81edb875d3833610ccb7a8 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 9 Jul 2020 20:24:58 +0200 Subject: [PATCH] Add stale-if-error and max-stale --- src/libdoh/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libdoh/src/lib.rs b/src/libdoh/src/lib.rs index 7a8c56a..0060157 100644 --- a/src/libdoh/src/lib.rs +++ b/src/libdoh/src/lib.rs @@ -212,7 +212,7 @@ impl DoH { .header(hyper::header::CONTENT_TYPE, "application/dns-message") .header( hyper::header::CACHE_CONTROL, - format!("max-age={}, stale-while-revalidate={}", ttl, ttl).as_str(), + format!("max-age={}, max-stale={}, stale-while-revalidate={}, stale-if-error={}", ttl, ttl, ttl, ttl).as_str(), ) .body(Body::from(packet)) .unwrap();