Removes the incorrect use of the encoding header in each JSON response (#1616)

The ResponseBuilder's "encoding()" function sets the http header "Content-Encoding", which is used to compress the media type and not to specify the character encoding.

Signed-off-by: Paul Vogel <pavog@users.noreply.github.com>
This commit is contained in:
Paul Vogel 2020-09-08 12:00:54 +02:00 committed by GitHub
parent ab8aa9ed3a
commit 695647c7f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,8 +94,7 @@ public class JSONResponse {
* @return ResponseBuilder configured for "Content-Type" MediaType.APPLICATION_JSON
*/
private ResponseBuilder responseBuilder(Response.StatusType status) {
return Response.status(status).header("Content-Type", MediaType.APPLICATION_JSON)
.encoding(StandardCharsets.UTF_8.name());
return Response.status(status).header("Content-Type", MediaType.APPLICATION_JSON);
}
/**