Hello,
(while researching some details for the pending documentation pull
request I noticed):
SpdyReceiveListener is using:
this.maxEntitySize =
undertowOptions.get(UndertowOptions.MAX_ENTITY_SIZE,
UndertowOptions.DEFAULT_MAX_ENTITY_SIZE);
While HTTPReadListener and AjpReadListener is using:
this.maxEntitySize =
connection.getUndertowOptions().get(UndertowOptions.MAX_ENTITY_SIZE,
0);
The DEFAULT_MAX_ENTITY_SIZE is defined as -1. I think it would be good
to use the constant in HTTP+AjpReadListener (and
HttpServerExchange(ServerConnection)) as well.
I think using -1 as the constant and in all places looks better, but
more backward compatible would be 0. In
HttpServerExchange#maxEntitySize for example it is documented as 0
means unlimited.
The limit is checked here, and all accept 0 and -1 as unlimited:
FixedLengthStreamSourceConduit#checkMaxSize()
AjpServerRequestConduit#soRead()
ChunkedStreamSourceConduit#updateRemainingAllowed()
Gruss
Bernd