mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-09 00:29:04 +00:00
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>