From e8ea98017f1c1dd5c892e2580e7635608afce83a Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Fri, 21 Jun 2013 16:09:49 +0200 Subject: [PATCH] Fix regression introduced by 0364265f4692b2f2f28ab36037c4ab6f3c242eae which could lead to corrupt attribute values --- .../handler/codec/http/multipart/AbstractMemoryHttpData.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractMemoryHttpData.java b/codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractMemoryHttpData.java index ac83db6ad9..b6aa0ccdf4 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractMemoryHttpData.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractMemoryHttpData.java @@ -98,8 +98,8 @@ public abstract class AbstractMemoryHttpData extends AbstractHttpData { cbb.writerIndex(cbb.writerIndex() + buffer.readableBytes()); } else { CompositeByteBuf cbb = compositeBuffer(); - cbb.addComponent(buffer); - cbb.writerIndex(buffer.readableBytes()); + cbb.addComponents(byteBuf, buffer); + cbb.writerIndex(byteBuf.readableBytes() + buffer.readableBytes()); byteBuf = cbb; } }