diff --git a/src/main/java/org/jboss/netty/handler/codec/http/MixedAttribute.java b/src/main/java/org/jboss/netty/handler/codec/http/MixedAttribute.java index 62a637015c..4bad8f9c03 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/MixedAttribute.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/MixedAttribute.java @@ -73,8 +73,10 @@ public class MixedAttribute implements Attribute { if (attribute.length() + buffer.readableBytes() > limitSize) { DiskAttribute diskAttribute = new DiskAttribute(attribute .getName()); - diskAttribute.addContent(((MemoryAttribute) attribute) + if (((MemoryAttribute) attribute).getChannelBuffer() != null) { + diskAttribute.addContent(((MemoryAttribute) attribute) .getChannelBuffer(), last); + } attribute = diskAttribute; } }