NullPointerException on timeout in HttpComponentsClientHttpConnector when using Apache HttpComponents #30245
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Receiving a NullPointerException on timeout in HttpComponentsClientHttpConnector when using Apache HttpComponents.
HttpComponents (core5) throws exceptions on timeout as follows:
stream.reset(new H2StreamResetException(H2Error.NO_ERROR, "Timeout due to inactivity (" + timeout + ")"));
Spring Web
HttpComponentsClientHttpConnector
handles it as follows;Since
hsre.getCause()
is null, it produces aNullPointerException
when handling upstream in the constructor ofWebClientRequestException
.Solution: If
HttpStreamResetException
cause is null, the exception itself should be returned.Spring version: 6.0.4
HttpComponents (core5) version: 5.1.5
The text was updated successfully, but these errors were encountered: