Skip to content

Commit 5d377a4

Browse files
jbescossenivam
authored andcommitted
Wrapper adds flushBuffer
Signed-off-by: Jorge Bescos Gascon <[email protected]>
1 parent 75898f4 commit 5d377a4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ext/mvc-jsp/src/main/java/org/glassfish/jersey/server/mvc/jsp/JspTemplateProcessor.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -124,6 +124,15 @@ public ServletOutputStream getOutputStream() throws IOException {
124124
public PrintWriter getWriter() throws IOException {
125125
return responseWriter;
126126
}
127+
128+
@Override
129+
public void flushBuffer() throws IOException {
130+
/*
131+
* Need to avoid different implementations to do something else, like invalidating new
132+
* headers after flushBuffer, because later when ContainerResponse.closes it flushBuffer again.
133+
*/
134+
getOutputStream().flush();
135+
}
127136
});
128137
} catch (final Exception e) {
129138
throw new ContainerException(e);

0 commit comments

Comments
 (0)