Skip to content

Commit 6f86b08

Browse files
committed
Add comment to explain content-type in header contains
1 parent a7df9a3 commit 6f86b08

File tree

1 file changed

+1
-0
lines changed
  • test/protocol-tests-core/src/main/java/software/amazon/awssdk/protocol/asserts/marshalling

1 file changed

+1
-0
lines changed

test/protocol-tests-core/src/main/java/software/amazon/awssdk/protocol/asserts/marshalling/HeadersAssertion.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ private void assertHeadersContains(HttpHeaders actual) {
6565
assertTrue(String.format("Header '%s' was expected to be present. Actual headers: %s", expectedKey, actual),
6666
actual.getHeader(expectedKey).isPresent());
6767
List<String> actualValues = actual.getHeader(expectedKey).values();
68+
// the Java SDK adds charset to content-type. This is valid but not included in the protocol tests
6869
if (expectedKey.equalsIgnoreCase("Content-Type") && actualValues.size() == 1) {
6970
actualValues = Collections.singletonList(actualValues.get(0).replace("; charset=UTF-8", ""));
7071
}

0 commit comments

Comments
 (0)