Reactive AbstractErrorWebExceptionHandler#htmlEscape() may be blocking #26712
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Spring Boot 2.4.4 using WebFlux
Spring Framework 5.3.5
Spring Cloud Gateway 3.0.2
Blocking call detected by Blockhound when returning an error response to a browser. In particular, saw this happening when the browser sends a
GET /favicon.ico
request, resulting in a 404 whitelabel error page being rendered.As a workaround for now, I've disabled the whitelabel error page by setting
server.error.whitelabel.enabled
tofalse
.The call to
AbstractErrorWebExceptionHandler#htmlEscape()
can trigger the initialisation of Spring Framework's static classHtmlUtils
. One of its static field -characterEntityReferences
- is of typeHtmlCharacterEntityReferences
and its constructor loads the fileHtmlCharacterEntityReferences.properties
in a blocking way.Full stacktrace:
The text was updated successfully, but these errors were encountered: