We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 901bbcb commit 866ff39Copy full SHA for 866ff39
1 file changed
modules/jooby-rocker/src/main/java/io/jooby/rocker/RockerHandler.java
@@ -12,6 +12,7 @@
12
import io.jooby.Route;
13
14
import javax.annotation.Nonnull;
15
+import java.util.List;
16
17
class RockerHandler implements Route.Handler {
18
private final Route.Handler next;
@@ -24,9 +25,10 @@ class RockerHandler implements Route.Handler {
24
25
try {
26
RockerModel template = (RockerModel) next.apply(ctx);
27
ArrayOfByteArraysOutput buff = template.render(ArrayOfByteArraysOutput.FACTORY);
28
+ List<byte[]> arrays = buff.getArrays();
29
ctx.setResponseType(MediaType.html);
30
ctx.setResponseLength(buff.getByteLength());
- ctx.send(buff.asReadableByteChannel());
31
+ ctx.send(arrays.toArray(new byte[arrays.size()][]));
32
return ctx;
33
} catch (Throwable x) {
34
ctx.sendError(x);
0 commit comments