How do you configure Javalin to change the max request size, specifically the config to increase the max size of the query parameters on the request (avoiding 414 URI too long
)?
I get 414 URI is too long
when I exceed what looks like a default size of 8KB so would like to configure my Javalin server to increase that slightly.
I think it uses Jetty under the hood which has a HttpConfiguration.requestHeaderSize
variable that may control it. Or there's a HttpParser._maxHeaderBytes
which is checked before throwing the URI_TOO_LONG_414
exception.
I can't see how it can all be wired up...
Only change the
HttpConfiguration
, it will inform theHttpParser
.You should be leery of doing this because ...
Also, depending on what technology Javalin is using, you might need to also increase the
ContextHandler
maxFormContentSize
and/ormaxFormKeys
.If you have reached this need, it screams of abuse of the HTTP spec, you should investigate moving to a traditional HTTP POST with
Content-Type: application/x-www-form-urlencoded
instead.