Netty responding before data is completely read

Trustin Lee trustin at gmail.com
Mon Jan 3 21:47:31 EST 2011


HttpRequestDecoder splits the PUT request into a HttpRequest and HttpChunks to avoid loading a large content into memory.  You could use HttpChunkAggregator if you want Netty to merge tem into a single HttpRequest at the risk of higher memory consumption.  Or you could keep discarding the HttpChunks of the unauthorized requests and then send the 401 response.  The most HTTP examples shows how to handle HttpChunks, so you could srart from there.

HTH

--
Trustin Lee - http://gleamynode.net/
Sent from a mobile device - please excuse the brevity.

On Jan 2, 2011, at 12:34 AM, kylar <kylar42 at gmail.com> wrote:

> 
> Here's my situation:
> 
> I have a fairly simple server that does some basic DAV like things,
> including an http PUT method. At the beginning of my processing, I do a
> basic authentication. In the cases where it fails, it appears that Netty is
> returning my 401 before the rest of the body has been read off the wire,
> causing some client confusion. 
> 
> I'm trying to get a simple use case, but offhand, can anyone throw out some
> ideas of what I might be doing wrong?
> 
> Thanks,
> Tom
> -- 
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-responding-before-data-is-completely-read-tp5878882p5878882.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users



More information about the netty-users mailing list