Closed Kilipurt closed 1 year ago
Thanks for the report. Unfortunately, there's nothing that we can do about this. The URI to which the request has been sent (http://localhost:8080/some-path%
) is invalid as there's an incomplete %
-encoded character at the end of the URL. This results in a failure very early in Tomcat's request handling, before it is able to determine to which context and servlet the request should be routed. As a result, when the 400 error response is being sent, it can't be routed into Spring Boot's custom error handling.
I get the response with an error page as expected if an error occurs during request processing. However, if I try to perform the request with a '%' sign at the end (like
http://localhost:8080/some-path%
) I get a response like this:Seems this is the default tomcat response. It is not overridden by custom response.
I am using Spring Boot v2.7.2 with web starter. Error controller:
aplication.yml: