verify encoding and content type

This commit is contained in:
Sebastian Sdorra
2019-02-01 09:42:19 +01:00
parent 34542e5cf1
commit 0a29f41835
2 changed files with 9 additions and 1 deletions

View File

@@ -81,7 +81,6 @@ public class I18nServlet extends HttpServlet {
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json");
try (PrintWriter out = response.getWriter()) {
response.setContentType("application/json");
String path = req.getServletPath();
Function<String, Optional<JsonNode>> jsonFileProvider = usedPath -> Optional.empty();
BiConsumer<String, JsonNode> createdJsonFileConsumer = (usedPath, jsonNode) -> log.debug("A json File is created from the path {}", usedPath);