diff --git a/src/main/java/org/jboss/netty/handler/codec/http/MixedFileUpload.java b/src/main/java/org/jboss/netty/handler/codec/http/MixedFileUpload.java index 91e0179547..51994ff267 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/MixedFileUpload.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/MixedFileUpload.java @@ -62,8 +62,10 @@ public class MixedFileUpload implements FileUpload { .getContentType(), fileUpload .getContentTransferEncoding(), fileUpload.getCharset(), definedSize); - diskFileUpload.addContent(((MemoryFileUpload) fileUpload) + if (((MemoryFileUpload) fileUpload).getChannelBuffer() != null){ + diskFileUpload.addContent(((MemoryFileUpload) fileUpload) .getChannelBuffer(), last); + } fileUpload = diskFileUpload; } }