Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static TestPair create(Jex app) {
}

@Override
public void close() throws Exception {
public void close() {
shutdown();
}
}
4 changes: 3 additions & 1 deletion avaje-jex/src/main/java/io/avaje/jex/JexConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ default JexConfig httpsConfig(SSLContext sslContext) {
int rangeChunkSize();

/**
* Sets the the max size of request body that can be accessed without using using an InputStream
* Sets the the max size of request body that can be accessed without using using an InputStream.
*
* <p>providing -1 means there is no limit
*
* @param maxRequestSize The size.
*/
Expand Down
2 changes: 1 addition & 1 deletion avaje-jex/src/main/java/io/avaje/jex/core/JdkContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public byte[] bodyAsBytes() {
if (bodyBytes == null) {
var contentLength = contentLength();
long maxRequestSize = mgr.maxRequestSize();
if (contentLength > maxRequestSize || contentLength < 0) {
if (maxRequestSize > 0 && (contentLength > maxRequestSize || contentLength < 0)) {
throw new HttpResponseException(
HttpStatus.REQUEST_ENTITY_TOO_LARGE_413.status(),
"Body content length unknown or greater than max configured size (%s bytes)"
Expand Down