Files
spring-framework/spring-web
lejuho 4397416220 Handle zero readTimeout in JdkClientHttpConnector
Prior to this commit, JdkClientHttpConnector#setReadTimeout(Duration)
passed Duration.ZERO through to HttpRequest.Builder#timeout, which
rejects non-positive durations. As a result, every request failed with
an IllegalArgumentException ("Invalid duration: PT0S").

gh-37234 already treats a zero read timeout as an infinite timeout in
JdkClientHttpRequestFactory, which is backed by the same JDK HttpClient
API.

This commit applies the same handling to the reactive
JdkClientHttpConnector so that a zero Duration results in no timeout
being set on the underlying request.

See gh-37232
Closes gh-37412

Signed-off-by: lejuho <52308082+lejuho@users.noreply.github.com>
2026-10-07 12:48:02 +02:00
..