[undertow-dev] Question regarding max-post-size

Stuart Douglas sdouglas at redhat.com
Mon Jul 25 17:41:40 EDT 2016


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

io.undertow.servlet.handlers.ServletRequestContext.requireCurrent().getExchange()

Stuart



On Mon, Jul 25, 2016 at 11:22 PM, David Robison <david.robison at psgglobal.net
> 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:
>
>
>
> @POST
>
> @Consumes("*/*")
>
> @Path("/Receive/{videoId}")
>
> *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
>
> david.robison at psgglobal.net
>
> *www.psgglobal.net <http://www.psgglobal.net/>*
>
> [image: cid:image003.png at 01D19182.F24CA3E0]
>
> *Prometheus Security Group Global, Inc.*
>
> 3019 Alvin Devane Boulevard
>
> Building 4, Suite 450
>
> Austin, TX 78741
>
> [image: cid:image003.png at 01D19182.F24CA3E0]
>
>
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20160726/be59e1db/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 247 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/undertow-dev/attachments/20160726/be59e1db/attachment-0001.png 


More information about the undertow-dev mailing list