Important: This news article covers an old version of Javalin (v1.4.0).
The current version is v6.3.0.
See the documentation page for up-to-date information.
See the documentation page for up-to-date information.
1.4.0 introduced a couple of bugs. The good news is we’ve fixed them in 1.4.1.
Features
GitHub user ShikaSD has contributed a lot of new config options and features:
Config options
val app = Javalin.create().apply {
defaultContentType(string) // set a default content-type for responses
defaultCharacterEncoding(string) // set a default character-encoding for responses
maxBodySizeForRequestCache(long) // set max body size for request cache
disableRequestCache() // disable request caching
}
Other features
- Route declarations can now accept regex patterns (
app.get("/:param/[0-9]+/") { ... }
)
Bugfixes
ctx.redirect(path, status)
used to ignore status-code, always using302
. This has been fixed.CacheRequestWrapper
used to not provide access to theInputStream
for requests ifTransfer-Encoding
was chunked. This has been fixed.- Dynamic GZIP only worked for
ctx.result(string)
before, now it also works forctx.result(stream)