From 16e4747d3cb2c2a53a6bef554bca306d8594a080 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 14 Sep 2012 17:51:04 -0400
Subject: [PATCH] Mostly complete blob view line links feature, DOM offset bug remains (issue 130)

---
 src/com/gitblit/JsonServlet.java |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/com/gitblit/JsonServlet.java b/src/com/gitblit/JsonServlet.java
index a795896..3ad2b7d 100644
--- a/src/com/gitblit/JsonServlet.java
+++ b/src/com/gitblit/JsonServlet.java
@@ -41,6 +41,12 @@
 
 	private static final long serialVersionUID = 1L;
 
+	protected final int forbiddenCode = HttpServletResponse.SC_FORBIDDEN;
+	
+	protected final int notAllowedCode = HttpServletResponse.SC_METHOD_NOT_ALLOWED;
+
+	protected final int failureCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
+	
 	protected final Logger logger;
 
 	public JsonServlet() {
@@ -116,6 +122,7 @@
 		if (o != null) {
 			// Send JSON response
 			String json = JsonUtils.toJsonString(o);
+			response.setCharacterEncoding(Constants.ENCODING);
 			response.getWriter().append(json);
 		}
 	}

--
Gitblit v1.9.1