Browse Source

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>
stable-4.7
Matthias Sohn 6 years ago
parent
commit
1a4e12a451
  1. 4
      org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java

4
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(); channel.close();
// TODO check if status 200 is ok for PUT request, HTTP foresees 204 // TODO check if status 200 is ok for PUT request, HTTP foresees 204
// for successful PUT without response body // for successful PUT without response body
response.setStatus(HttpServletResponse.SC_OK); if (!response.isCommitted()) {
response.setStatus(HttpServletResponse.SC_OK);
}
} finally { } finally {
context.complete(); context.complete();
} }

Loading…
Cancel
Save