From a38ea0bd884d011ae2c1f98c70fe925874d7a339 Mon Sep 17 00:00:00 2001 From: Kanstantsin Shautsou Date: Mon, 18 Feb 2019 00:57:44 +0300 Subject: [PATCH] Set 3 mb as limit for json responce. --- .../com/github/dockerjava/netty/NettyInvocationBuilder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/github/dockerjava/netty/NettyInvocationBuilder.java b/src/main/java/com/github/dockerjava/netty/NettyInvocationBuilder.java index 39ea98c51..c57f885be 100644 --- a/src/main/java/com/github/dockerjava/netty/NettyInvocationBuilder.java +++ b/src/main/java/com/github/dockerjava/netty/NettyInvocationBuilder.java @@ -151,7 +151,7 @@ public void get(TypeReference typeReference, ResultCallback resultCall HttpResponseHandler responseHandler = new HttpResponseHandler(requestProvider, resultCallback); channel.pipeline().addLast(responseHandler); - channel.pipeline().addLast(new JsonObjectDecoder()); + channel.pipeline().addLast(new JsonObjectDecoder(3 * 1024 * 1024)); channel.pipeline().addLast(jsonResponseHandler); sendRequest(requestProvider, channel); @@ -300,7 +300,7 @@ public void post(final Object entity, TypeReference typeReference, final HttpResponseHandler responseHandler = new HttpResponseHandler(requestProvider, resultCallback); channel.pipeline().addLast(responseHandler); - channel.pipeline().addLast(new JsonObjectDecoder()); + channel.pipeline().addLast(new JsonObjectDecoder(3 * 1024 * 1024)); channel.pipeline().addLast(jsonResponseHandler); sendRequest(requestProvider, channel); @@ -408,7 +408,7 @@ public void post(TypeReference typeReference, ResultCallback resultCal channel.pipeline().addLast(new ChunkedWriteHandler()); channel.pipeline().addLast(responseHandler); - channel.pipeline().addLast(new JsonObjectDecoder()); + channel.pipeline().addLast(new JsonObjectDecoder(3 * 1024 * 1024)); channel.pipeline().addLast(jsonResponseHandler); postChunkedStreamRequest(requestProvider, channel, body);