From 2badcd16f7ae0ce46f7c0cd241c635493d7e6508 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 12 Jul 2015 11:56:33 +1200 Subject: Set correct JSON content type (fix #1298) --- src/org/traccar/http/BaseServlet.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/org/traccar') diff --git a/src/org/traccar/http/BaseServlet.java b/src/org/traccar/http/BaseServlet.java index 89eefc11c..394e4d317 100644 --- a/src/org/traccar/http/BaseServlet.java +++ b/src/org/traccar/http/BaseServlet.java @@ -38,6 +38,8 @@ public abstract class BaseServlet extends HttpServlet { command = ""; } try { + resp.setContentType("application/json"); + resp.setCharacterEncoding("UTF-8"); if (!handle(command, req, resp)) { resp.sendError(HttpServletResponse.SC_BAD_REQUEST); } -- cgit v1.2.3