James Moger
2013-04-12 5e1f7df4a141997dd698f137eefda8d6e3ba3fa9
Properly set application/json content-type on api calls
2 files modified
2 ■■■■■ changed files
releases.moxie 1 ●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/JsonServlet.java 1 ●●●● patch | view | raw | blame | history
releases.moxie
@@ -26,6 +26,7 @@
    changes:
      - Disable Gson's pretty printing which has a huge performance gain
     - Properly set application/json content-type on api calls
     - Updated Polish translation
     
    additions: 
src/main/java/com/gitblit/JsonServlet.java
@@ -123,6 +123,7 @@
            // Send JSON response
            String json = JsonUtils.toJsonString(o);
            response.setCharacterEncoding(Constants.ENCODING);
            response.setContentType("application/json");
            response.getWriter().append(json);
        }
    }