From 4bd3a8e431a4ab239b50995df4ccf8460d5e88fe Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Thu, 24 Aug 2023 15:05:43 +1000 Subject: [PATCH] Revert "Issue #10337 - fixes for SizeLimitHandler" This reverts commit 2126ac262cbd4fcd92e32ea806e5383d1e8ea71f. --- .../main/java/org/eclipse/jetty/server/SizeLimitHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/SizeLimitHandler.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/SizeLimitHandler.java index 7bf0f319b37..b29da977d1a 100644 --- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/SizeLimitHandler.java +++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/SizeLimitHandler.java @@ -62,7 +62,7 @@ public class SizeLimitHandler extends Handler.Wrapper if (_requestLimit >= 0 && contentLength > _requestLimit) { String s = "Request body is too large: " + contentLength + ">" + _requestLimit; - callback.failed(new HttpException.RuntimeException(413, s)); + Response.writeError(request, response, callback, 413, s); return true; } }