From 7e4149978bb295ca23dea06a114d5a87003370fd Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Wed, 23 May 2012 11:40:57 -0700 Subject: [PATCH] Revert "bug 10946: Add default buffer length for compressed request" This reverts commit e3d30c6be661bc52bcac23470f14bd0bd89b8641. This fix CS-14646. Reviewed-by: Anthony --- core/src/com/cloud/agent/transport/Request.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core/src/com/cloud/agent/transport/Request.java b/core/src/com/cloud/agent/transport/Request.java index 832d9f2ac5b..35bc5647ce9 100755 --- a/core/src/com/cloud/agent/transport/Request.java +++ b/core/src/com/cloud/agent/transport/Request.java @@ -259,11 +259,6 @@ public class Request { public static ByteBuffer doDecompress(ByteBuffer buffer, int length) { byte[] byteArrayIn = new byte[1024]; - int allocLength = length; - /* Add default length to support 2.2.8 */ - if (allocLength < 65535) { - allocLength = 65535; - } ByteArrayInputStream byteIn; if (buffer.hasArray()) { byteIn = new ByteArrayInputStream(buffer.array(), @@ -274,7 +269,7 @@ public class Request { buffer.get(array); byteIn = new ByteArrayInputStream(array); } - ByteBuffer retBuff = ByteBuffer.allocate(allocLength); + ByteBuffer retBuff = ByteBuffer.allocate(length); int len = 0; try { GZIPInputStream in = new GZIPInputStream(byteIn);