You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever Netty fails to decode a HttpRequest due to a TooLongFrameException because for instance the HTTP line max size has been exceeded, this is not treated as a bad request by reactor-netty as such. Instead an empty default request is bubbled up (which then in my case fails as it is considered Unauthorized due to the stripped headers in my Spring Boot application).
Expected behavior
Decoder failures should result in bad requests, and not return empty default requests. Preferably the right status code is set (414 if the request URL is simply too long e.g.), but having it return as a bad request would already be a big improvement.
Actual behavior
If the request cannot be decoded, an empty default request with URL GET :/bad-request is returned.
Steps to reproduce
NettyContext context = HttpServer
.create(8081)
.newHandler((req, res) ->
req.receiveContent()
.map(DecoderResultProvider::decoderResult)
.reduce((a, b) -> b)
.map(DecoderResult::cause)
.map(Throwable::toString)
.flatMap(cause -> res.sendString(Mono.just(cause)).then()))
.block();
Issue a simple CURL request with a query param containing a (long) list of IDs:
Whenever Netty fails to decode a HttpRequest due to a
TooLongFrameException
because for instance the HTTP line max size has been exceeded, this is not treated as a bad request byreactor-netty
as such. Instead an empty default request is bubbled up (which then in my case fails as it is consideredUnauthorized
due to the stripped headers in my Spring Boot application).Expected behavior
Decoder failures should result in bad requests, and not return empty default requests. Preferably the right status code is set (
414
if the request URL is simply too long e.g.), but having it return as a bad request would already be a big improvement.Actual behavior
If the request cannot be decoded, an empty default request with URL
GET :/bad-request
is returned.Steps to reproduce
Issue a simple CURL request with a query param containing a (long) list of IDs:
results in:
Reactor Netty version
0.7.5.RELEASE
JVM version (e.g.
java -version
)OS version (e.g.
uname -a
)Linux 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: