Class BodyWithoutContentLengthTest

java.lang.Object
io.micronaut.http.server.tck.tests.BodyWithoutContentLengthTest

@Tag("body-without-content-length") public class BodyWithoutContentLengthTest extends Object
A request that carries no body at all must still reach a route that declares a body type.

A GET has no Content-Length header, so the body length is reported as unknown rather than zero. That is indistinguishable from a body that has not arrived yet unless the server checks whether any bytes exist, and a server that assumes "unknown means present" fails to decode the absent body and answers 400.

The shape comes from the OAuth 2.0 authorization code callback, which is a browser redirect carrying only query parameters into a controller whose parameter is a HttpRequest<Map<String, Object>>.

  • Field Details

  • Constructor Details

    • BodyWithoutContentLengthTest

      public BodyWithoutContentLengthTest()