Add Cache-Control must-understand directive

Signed-off-by: heka1024 <heka1024@gmail.com>
This commit is contained in:
heka1024
2026-08-28 15:10:37 +02:00
committed by Brian Clozel
parent 2588fb078e
commit d9e240b37d
2 changed files with 25 additions and 0 deletions
@@ -78,6 +78,12 @@ class CacheControlTests {
assertThat(cc.getHeaderValue()).isEqualTo("no-store");
}
@Test
void mustUnderstand() {
CacheControl cc = CacheControl.noStore().mustUnderstand();
assertThat(cc.getHeaderValue()).isEqualTo("no-store, must-understand");
}
@Test
void staleIfError() {
CacheControl cc = CacheControl.maxAge(1, TimeUnit.HOURS).staleIfError(2, TimeUnit.HOURS);