You need to use io.undertow.server.HttpServerExchange#setMaxEntitySize (just set it to zero). This has to be done before you start reading from the stream.

If you are using Servlet and need to get hold of the current exchange you can use



On Mon, Jul 25, 2016 at 11:22 PM, David Robison <> wrote:

I have created a REST interface that receives a continuous stream of JPEGs from a video decoder for the purpose of writing then to a disk file.  The service is defined as:





public Response receiveVideo(@PathParam("videoId") String videoId, InputStream content)


Everything works fine up until it reaches the max-post-size and then the connection is terminated. Is there any way to disable the max-post-size when streaming video to a REST interface?


Thanks, David


David R Robison

Senior Systems Engineer

O. +1 512 247 3700

M. +1 757 286 0022


Prometheus Security Group Global, Inc.

3019 Alvin Devane Boulevard

Building 4, Suite 450

Austin, TX 78741



undertow-dev mailing list