diff --git a/core/src/main/java/io/undertow/server/protocol/ajp/AjpServerRequestConduit.java b/core/src/main/java/io/undertow/server/protocol/ajp/AjpServerRequestConduit.java index 62475c2104..4ccf7c0941 100644 --- a/core/src/main/java/io/undertow/server/protocol/ajp/AjpServerRequestConduit.java +++ b/core/src/main/java/io/undertow/server/protocol/ajp/AjpServerRequestConduit.java @@ -31,6 +31,7 @@ import io.undertow.conduits.ConduitListener; import io.undertow.server.Connectors; import io.undertow.server.HttpServerExchange; +import io.undertow.server.RequestTooBigException; import io.undertow.util.ImmediatePooledByteBuffer; import org.xnio.IoUtils; import org.xnio.channels.StreamSinkChannel; @@ -202,6 +203,8 @@ public int read(ByteBuffer dst) throws IOException { } assert STATE_FINISHED == state; return -1; + } catch (RequestTooBigException e) { + throw e; } catch (IOException | RuntimeException e) { IoUtils.safeClose(exchange.getConnection()); throw e;