Added test to be sure that body limit is respected when file uploads handling is disabled
@@ -725,6 +725,21 @@ public class BodyHandlerTest extends WebTestBase {
}, 200, "OK", null);
}
+ @Test
+ public void testBodyLimitWithHandleFileUploadsFalse() throws Exception
+ {
+ router.clear();
+
+ BodyHandler bodyHandler = BodyHandler.create(false).setBodyLimit(2048);
+ router.route().handler(bodyHandler);
+
+ Buffer fileData = TestUtils.randomBuffer(4096);
+ router.route().handler(rc -> {
+ rc.response().end();
+ });
+ sendFileUploadRequest(fileData, 413, "Request Entity Too Large");
+ }
+
private String getNotCreatedTemporaryFolderName() throws IOException
{
File dir = tempUploads.newFolder();
