netty/netty — Issue #213: HttpPostRequestDecoder.offer(chunk) does not work with normal UAs in io.netty.example.http.upload.HttpUploadServerHandler
Author: ronaldslc
Created: 2012-03-02 10:46:55+00:00
State: open

Package: netty-4.0.0.Alpha1-20120301.012111-47.jar

Doing some testing on the latest Firefox with the netty Http server functions using codes similar to io.netty.example.http.upload.HttpUploadServerHandler.

When netty encounters chunked POST data. Post data could be incomplete, leading to 2nd / 3rd chunks with data such as the following:

Chunk1: test=1&test=2.......
Chunk2: st=100&.....
Chunk3: =200&....

Unfortunately HttpPostRequestDecoder cannot handle incomplete chunks individually such as the example above and will throw various error depending particularly in Chunk3 as the 'name' attribute is cut off at the end of Chunk 2.

I think the decoder needs to look at the entire picture (aggregate chunks before decoding) for it to work as expected, but what implications are there, particularly on large files?