NIOHTTPServerRequestAggregator
A ChannelInboundHandler
that handles HTTP chunked HTTPServerRequestPart
messages by aggregating individual message chunks into a single NIOHTTPServerRequestFull
.
final class NIOHTTPServerRequestAggregator
This is achieved by buffering the contents of all received HTTPServerRequestPart
messages until HTTPServerRequestPart.end
is received, then assembling the full message and firing a channel read upstream with it. It is useful for when you do not want to deal with chunked messages and just want to receive everything at once, and are happy with the additional memory used and delay handling of the message until everything has been received.
NIOHTTPServerRequestAggregator
may end up sending a HTTPResponseHead
:
Response status
413 Request Entity Too Large
when either thecontent-length
or the bytes received so far exceedmaxContentLength
.
NIOHTTPServerRequestAggregator
may close the connection if it is impossible to recover:
If
content-length
is too large andkeep-alive
is off.If the bytes received exceed
maxContentLength
and the client didn’t signalcontent-length