#314: force file content in utf8

This commit is contained in:
Benjamin Gamard 2019-05-22 15:36:50 +02:00
parent 1a90a0e0ad
commit 38939e5d05

View File

@ -608,7 +608,7 @@ public class FileResource extends BaseResource {
if (size != null) {
if (size.equals("content")) {
return Response.ok(Strings.nullToEmpty(file.getContent()))
.header(HttpHeaders.CONTENT_TYPE, "text/plain")
.header(HttpHeaders.CONTENT_TYPE, "text/plain; charset=utf-8")
.build();
}