Skip to content

Commit

Permalink
Wrapper adds flushBuffer
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos committed Jun 26, 2020
1 parent 93b9605 commit 31c1880
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -124,6 +124,15 @@ public ServletOutputStream getOutputStream() throws IOException {
public PrintWriter getWriter() throws IOException {
return responseWriter;
}

@Override
public void flushBuffer() throws IOException {
/*
* Need to avoid different implementations to do something else, like invalidating new
* headers after flushBuffer, because later when ContainerResponse.closes it flushBuffer again.
*/
getOutputStream().flush();
}
});
} catch (final Exception e) {
throw new ContainerException(e);
Expand Down

0 comments on commit 31c1880

Please sign in to comment.