Skip to content

Commit 75331b5

Browse files
java-team-github-botGoogle Java Core Libraries
authored andcommitted
Add HttpHeaders.CDN_CACHE_CONTROL; see https://datatracker.ietf.org/doc/html/rfc9213
RELNOTES=`net`: Added `HttpHeaders.CDN_CACHE_CONTROL`. PiperOrigin-RevId: 874584961
1 parent 9857e70 commit 75331b5

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

‎android/guava-tests/test/com/google/common/net/HttpHeadersTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public void testConstantNameMatchesString() throws Exception {
5656
.buildOrThrow();
5757
ImmutableSet<String> uppercaseAcronyms =
5858
ImmutableSet.of(
59-
"CH", "ID", "DNT", "DNS", "DPR", "ECT", "GPC", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE",
60-
"UA", "UID", "URL", "WWW", "XSS");
59+
"CDN", "CH", "ID", "DNT", "DNS", "DPR", "ECT", "GPC", "HTTP2", "IP", "MD5", "P3P",
60+
"RTT", "TE", "UA", "UID", "URL", "WWW", "XSS");
6161

6262
for (Field field : httpHeadersFields()) {
6363
assertEquals(

‎android/guava/src/com/google/common/net/HttpHeaders.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,14 @@ private ReferrerPolicyValues() {}
265265
/** The HTTP {@code Allow} header field name. */
266266
public static final String ALLOW = "Allow";
267267

268+
/**
269+
* The HTTP <a href="https://datatracker.ietf.org/doc/rfc9213/">{@code CDN-Cache-Control}</a>
270+
* header field name.
271+
*
272+
* @since NEXT
273+
*/
274+
public static final String CDN_CACHE_CONTROL = "CDN-Cache-Control";
275+
268276
/** The HTTP {@code Content-Disposition} header field name. */
269277
public static final String CONTENT_DISPOSITION = "Content-Disposition";
270278

‎guava-tests/test/com/google/common/net/HttpHeadersTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public void testConstantNameMatchesString() throws Exception {
5656
.buildOrThrow();
5757
ImmutableSet<String> uppercaseAcronyms =
5858
ImmutableSet.of(
59-
"CH", "ID", "DNT", "DNS", "DPR", "ECT", "GPC", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE",
60-
"UA", "UID", "URL", "WWW", "XSS");
59+
"CDN", "CH", "ID", "DNT", "DNS", "DPR", "ECT", "GPC", "HTTP2", "IP", "MD5", "P3P",
60+
"RTT", "TE", "UA", "UID", "URL", "WWW", "XSS");
6161

6262
for (Field field : httpHeadersFields()) {
6363
assertEquals(

‎guava/src/com/google/common/net/HttpHeaders.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,14 @@ private ReferrerPolicyValues() {}
265265
/** The HTTP {@code Allow} header field name. */
266266
public static final String ALLOW = "Allow";
267267

268+
/**
269+
* The HTTP <a href="https://datatracker.ietf.org/doc/rfc9213/">{@code CDN-Cache-Control}</a>
270+
* header field name.
271+
*
272+
* @since NEXT
273+
*/
274+
public static final String CDN_CACHE_CONTROL = "CDN-Cache-Control";
275+
268276
/** The HTTP {@code Content-Disposition} header field name. */
269277
public static final String CONTENT_DISPOSITION = "Content-Disposition";
270278

0 commit comments

Comments
 (0)