• Brian Clozel's avatar
    Avoid 406 Not Acceptable for error pages · 2f78c72f
    Brian Clozel authored
    Prior to this commit, the `ErrorController` would override the original
    error response status if the error map cannot be written due to content
    negotiation with the HTTP client. In that case, the error handling
    infrastructure returns a `406 Not Acceptable` response.
    
    This commit improves the `ErrorController` so that
    `HttpMediaTypeNotAcceptableException` instances thrown by that
    controller are not returned as is but instead we write the error
    response with an empty body and the original HTTP error status.
    
    Fixes gh-19545
    See gh-19522
    2f78c72f
Name
Last commit
Last update
.bomr Loading commit data...
.github Loading commit data...
.mvn Loading commit data...
ci Loading commit data...
eclipse Loading commit data...
git/hooks Loading commit data...
idea Loading commit data...
spring-boot-project Loading commit data...
spring-boot-tests Loading commit data...
src/checkstyle Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
SUPPORT.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...