Skip to content

Commit

Permalink
Specify UTF8 for response content
Browse files Browse the repository at this point in the history
This is needed because in some other platforms, like Windows, the default charset might be different

Issue gh-12026
  • Loading branch information
marcusdacoregio committed Nov 16, 2022
1 parent 53148dc commit d5aabd7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void doFilterWhenCharacterEncodingThenEncodeSpecialCharactersCorrectly()
this.filter.setMetadataFilename(testMetadataFilename);
this.filter.doFilter(this.request, this.response, this.chain);
assertThat(this.response.getCharacterEncoding()).isEqualTo(StandardCharsets.UTF_8.name());
assertThat(new String(this.response.getContentAsByteArray())).isEqualTo(generatedMetadata);
assertThat(this.response.getContentAsString(StandardCharsets.UTF_8)).isEqualTo(generatedMetadata);
}

@Test
Expand Down

0 comments on commit d5aabd7

Please sign in to comment.