Fix NPE when non chunked message with a large variable

This commit is contained in:
Frédéric Brégier 2011-07-16 11:58:40 -07:00 committed by Trustin Lee
parent 6b3b3b7426
commit d6ea072ccc

View File

@ -62,8 +62,10 @@ public class MixedFileUpload implements FileUpload {
.getContentType(), fileUpload .getContentType(), fileUpload
.getContentTransferEncoding(), fileUpload.getCharset(), .getContentTransferEncoding(), fileUpload.getCharset(),
definedSize); definedSize);
diskFileUpload.addContent(((MemoryFileUpload) fileUpload) if (((MemoryFileUpload) fileUpload).getChannelBuffer() != null){
diskFileUpload.addContent(((MemoryFileUpload) fileUpload)
.getChannelBuffer(), last); .getChannelBuffer(), last);
}
fileUpload = diskFileUpload; fileUpload = diskFileUpload;
} }
} }