Skip to content

Commit 75a3d4d

Browse files
java-team-github-botGoogle Java Core Libraries
authored and
Google Java Core Libraries
committedMar 16, 2022
Add HttpHeaders constants for Sec-CH-DPR.
RELNOTES=`net`: Added `HttpHeaders` constants for `Sec-CH-DPR`. PiperOrigin-RevId: 435172482
1 parent aa45235 commit 75a3d4d

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed
 

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public void testConstantNameMatchesString() throws Exception {
5050
.build();
5151
ImmutableSet<String> uppercaseAcronyms =
5252
ImmutableSet.of(
53-
"CH", "ID", "DNT", "DNS", "ECT", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE", "UA", "UID",
54-
"URL", "WWW", "XSS");
53+
"CH", "ID", "DNT", "DNS", "DPR", "ECT", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE", "UA",
54+
"UID", "URL", "WWW", "XSS");
5555
assertConstantNameMatchesString(HttpHeaders.class, specialCases, uppercaseAcronyms);
5656
}
5757

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

+7
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,13 @@ private ReferrerPolicyValues() {}
712712
* @since NEXT
713713
*/
714714
public static final String SEC_CH_VIEWPORT_HEIGHT = "Sec-CH-Viewport-Height";
715+
/**
716+
* The HTTP <a href="https://wicg.github.io/responsive-image-client-hints/#sec-ch-dpr">{@code
717+
* Sec-CH-DPR}</a> header field name.
718+
*
719+
* @since NEXT
720+
*/
721+
public static final String SEC_CH_DPR = "Sec-CH-DPR";
715722
/**
716723
* The HTTP <a href="https://w3c.github.io/webappsec-fetch-metadata/">{@code Sec-Fetch-Dest}</a>
717724
* header field name.

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public void testConstantNameMatchesString() throws Exception {
5050
.build();
5151
ImmutableSet<String> uppercaseAcronyms =
5252
ImmutableSet.of(
53-
"CH", "ID", "DNT", "DNS", "ECT", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE", "UA", "UID",
54-
"URL", "WWW", "XSS");
53+
"CH", "ID", "DNT", "DNS", "DPR", "ECT", "HTTP2", "IP", "MD5", "P3P", "RTT", "TE", "UA",
54+
"UID", "URL", "WWW", "XSS");
5555
assertConstantNameMatchesString(HttpHeaders.class, specialCases, uppercaseAcronyms);
5656
}
5757

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

+7
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,13 @@ private ReferrerPolicyValues() {}
712712
* @since NEXT
713713
*/
714714
public static final String SEC_CH_VIEWPORT_HEIGHT = "Sec-CH-Viewport-Height";
715+
/**
716+
* The HTTP <a href="https://wicg.github.io/responsive-image-client-hints/#sec-ch-dpr">{@code
717+
* Sec-CH-DPR}</a> header field name.
718+
*
719+
* @since NEXT
720+
*/
721+
public static final String SEC_CH_DPR = "Sec-CH-DPR";
715722
/**
716723
* The HTTP <a href="https://w3c.github.io/webappsec-fetch-metadata/">{@code Sec-Fetch-Dest}</a>
717724
* header field name.

0 commit comments

Comments
 (0)