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>
This commit is contained in:
Matthias Sohn 2018-09-18 01:14:34 +02:00
parent c18c768678
commit 1a4e12a451
1 changed files with 3 additions and 1 deletions

View File

@ -150,7 +150,9 @@ protected void close() throws IOException {
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();
}