Class SizeLimitHandler

All Implemented Interfaces:
Handler, HandlerContainer, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, LifeCycle

@Deprecated(since="2021-05-27") public class SizeLimitHandler extends HandlerWrapper
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.

A handler that can limit the size of message bodies in requests and responses.

The optional request and response limits are imposed by checking the Content-Length header or observing the actual bytes seen by the handler. Handler order is important, in as much as if this handler is before a the GzipHandler, then it will limit compressed sized, if it as after the GzipHandler then the limit is applied to uncompressed bytes. If a size limit is exceeded then BadMessageException is thrown with a HttpStatus.PAYLOAD_TOO_LARGE_413 status.