Open kgibm opened 3 years ago
The design issues call consensus was to keep the existing behavior if such a response is sent back as part of processing in the HTTP channel but once the request is dispatched out of the HTTP stack (e.g. into WebContainer), then such a response code should not close the keepalive connection.
Liberty closes HTTP 1.0/1.1 keepalive connection if the response code is 400, 402-417, or 500-505 (any StatusCodes instance with the third parameter set to
true
). This is a more obscure performance use case, but sometimes app updates are rolled out that have more errors and that may lead to unnecessary performance investigations, or questions about sockets inCLOSE_WAIT
andTIME_WAIT
.In addition, the specification for Bean Validation purposely says to return a 400 when a parameter doesn't pass validation.