diff options
-rw-r--r-- | org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java index 984e4a962d..bfd551d58a 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java @@ -83,7 +83,8 @@ public abstract class LfsProtocolServlet extends HttpServlet { private static final long serialVersionUID = 1L; - private static final String CONTENTTYPE_VND_GIT_LFS_JSON = "application/vnd.git-lfs+json"; //$NON-NLS-1$ + private static final String CONTENTTYPE_VND_GIT_LFS_JSON = + "application/vnd.git-lfs+json; charset=utf-8"; //$NON-NLS-1$ private Gson gson = createGson(); @@ -143,6 +144,7 @@ public abstract class LfsProtocolServlet extends HttpServlet { LfsRequest request = gson.fromJson(r, LfsRequest.class); String path = req.getPathInfo(); + res.setContentType(CONTENTTYPE_VND_GIT_LFS_JSON); LargeFileRepository repo = null; try { repo = getLargeFileRepository(request, path); @@ -150,7 +152,6 @@ public abstract class LfsProtocolServlet extends HttpServlet { res.setStatus(SC_SERVICE_UNAVAILABLE); } else { res.setStatus(SC_OK); - res.setContentType(CONTENTTYPE_VND_GIT_LFS_JSON); TransferHandler handler = TransferHandler .forOperation(request.operation, repo, request.objects); gson.toJson(handler.process(), w); |