Skip to content

Commit 3d7d23d

Browse files
author
Sheng Yang
committed
Revert "bug 10946: Add default buffer length for compressed request"
This reverts commit e3d30c6. This fix CS-14646.
1 parent 93ce302 commit 3d7d23d

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎core/src/com/cloud/agent/transport/Request.java‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,6 @@ protected ByteBuffer serializeHeader(final int contentSize) {
259259

260260
public static ByteBuffer doDecompress(ByteBuffer buffer, int length) {
261261
byte[] byteArrayIn = new byte[1024];
262-
int allocLength = length;
263-
/* Add default length to support 2.2.8 */
264-
if (allocLength < 65535) {
265-
allocLength = 65535;
266-
}
267262
ByteArrayInputStream byteIn;
268263
if (buffer.hasArray()) {
269264
byteIn = new ByteArrayInputStream(buffer.array(),
@@ -274,7 +269,7 @@ public static ByteBuffer doDecompress(ByteBuffer buffer, int length) {
274269
buffer.get(array);
275270
byteIn = new ByteArrayInputStream(array);
276271
}
277-
ByteBuffer retBuff = ByteBuffer.allocate(allocLength);
272+
ByteBuffer retBuff = ByteBuffer.allocate(length);
278273
int len = 0;
279274
try {
280275
GZIPInputStream in = new GZIPInputStream(byteIn);

0 commit comments

Comments
 (0)