Skip to content

Commit

Permalink
Create constants for the SourceMap header
Browse files Browse the repository at this point in the history
None of the tests like this header name, so each required some workarounds.

RELNOTES=Add the SourceMap header to HttpHeaders

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=234254287
  • Loading branch information
lukesandberg authored and ronshapiro committed Feb 26, 2019
1 parent 282bdf8 commit a99c15f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
Expand Up @@ -39,6 +39,8 @@ public void testConstantNameMatchesString() throws Exception {
ImmutableBiMap.of(
"ETAG",
"ETag",
"SOURCE_MAP",
"SourceMap",
"X_WEBKIT_CSP",
"X-WebKit-CSP",
"X_WEBKIT_CSP_REPORT_ONLY",
Expand Down
8 changes: 8 additions & 0 deletions android/guava/src/com/google/common/net/HttpHeaders.java
Expand Up @@ -296,6 +296,14 @@ private ReferrerPolicyValues() {}
public static final String SET_COOKIE = "Set-Cookie";
/** The HTTP {@code Set-Cookie2} header field name. */
public static final String SET_COOKIE2 = "Set-Cookie2";

/**
* The HTTP <a href="http://goo.gl/Dxx19N">{@code SourceMap}</a> header field name.
*
* @since NEXT
*/
@Beta public static final String SOURCE_MAP = "SourceMap";

/**
* The HTTP <a href="http://tools.ietf.org/html/rfc6797#section-6.1">{@code
* Strict-Transport-Security}</a> header field name.
Expand Down
2 changes: 2 additions & 0 deletions guava-tests/test/com/google/common/net/HttpHeadersTest.java
Expand Up @@ -39,6 +39,8 @@ public void testConstantNameMatchesString() throws Exception {
ImmutableBiMap.of(
"ETAG",
"ETag",
"SOURCE_MAP",
"SourceMap",
"X_WEBKIT_CSP",
"X-WebKit-CSP",
"X_WEBKIT_CSP_REPORT_ONLY",
Expand Down
8 changes: 8 additions & 0 deletions guava/src/com/google/common/net/HttpHeaders.java
Expand Up @@ -296,6 +296,14 @@ private ReferrerPolicyValues() {}
public static final String SET_COOKIE = "Set-Cookie";
/** The HTTP {@code Set-Cookie2} header field name. */
public static final String SET_COOKIE2 = "Set-Cookie2";

/**
* The HTTP <a href="http://goo.gl/Dxx19N">{@code SourceMap}</a> header field name.
*
* @since NEXT
*/
@Beta public static final String SOURCE_MAP = "SourceMap";

/**
* The HTTP <a href="http://tools.ietf.org/html/rfc6797#section-6.1">{@code
* Strict-Transport-Security}</a> header field name.
Expand Down

0 comments on commit a99c15f

Please sign in to comment.