aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2018-09-18 01:14:34 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2018-09-18 01:29:58 +0200
commit1a4e12a451217075310458b94a39bfc132abb276 (patch)
tree2dc3ef2af87b86743d1d39de96dadb8240505009
parentc18c768678094dba36e4d394de7a673d1a8764c4 (diff)
downloadjgit-1a4e12a451217075310458b94a39bfc132abb276.tar.gz
jgit-1a4e12a451217075310458b94a39bfc132abb276.zip
Fix ObjectUploadListener#close
Do not try to set response status if response is already committed. Change-Id: I9a7c2871c86eb53416b905324775f3ed961c8ae6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java
index 84e4e6f1c6..da86880472 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java
@@ -150,7 +150,9 @@ public class ObjectUploadListener implements ReadListener {
channel.close();
// TODO check if status 200 is ok for PUT request, HTTP foresees 204
// for successful PUT without response body
- response.setStatus(HttpServletResponse.SC_OK);
+ if (!response.isCommitted()) {
+ response.setStatus(HttpServletResponse.SC_OK);
+ }
} finally {
context.complete();
}