summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs.server
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.lfs.server')
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java
index a8e3c11e27..15c4448da8 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java
@@ -202,6 +202,11 @@ public class FileLfsServlet extends HttpServlet {
*/
protected static void sendError(HttpServletResponse rsp, int status, String message)
throws IOException {
+ if (rsp.isCommitted()) {
+ rsp.getOutputStream().close();
+ return;
+ }
+ rsp.reset();
rsp.setStatus(status);
PrintWriter writer = rsp.getWriter();
gson.toJson(new Error(message), writer);