Skip to content

Commit 7d3a045

Browse files
jasondleefl4via
authored andcommitted
[UNDERTOW-2133] Handle RequestTooBigException
If the request is too big, throw an excpetion to allow the connection to be cleaned up closed properly up the call stack.
1 parent b67e821 commit 7d3a045

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

core/src/main/java/io/undertow/server/protocol/ajp/AjpServerRequestConduit.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import io.undertow.conduits.ConduitListener;
3232
import io.undertow.server.Connectors;
3333
import io.undertow.server.HttpServerExchange;
34+
import io.undertow.server.RequestTooBigException;
3435
import io.undertow.util.ImmediatePooledByteBuffer;
3536
import org.xnio.IoUtils;
3637
import org.xnio.channels.StreamSinkChannel;
@@ -202,6 +203,8 @@ public int read(ByteBuffer dst) throws IOException {
202203
}
203204
assert STATE_FINISHED == state;
204205
return -1;
206+
} catch (RequestTooBigException e) {
207+
throw e;
205208
} catch (IOException | RuntimeException e) {
206209
IoUtils.safeClose(exchange.getConnection());
207210
throw e;

0 commit comments

Comments
 (0)