public static int getMaxBufferSizeToSave ( final HttpServerExchange exchange ) { int maxSize = exchange . getConnection ( ) . getUndertowOptions ( ) . get ( UndertowOptions . MAX_BUFFERED_REQUEST_SIZE , UndertowOptions . DEFAULT_MAX_BUFFERED_REQUEST_SIZE ) ; return maxSize ; }
With added possibility to save data from buffer instead f from request body there has to be method which returns max allowed buffer size to save .