Java11 Http2Client rejects documented zero connect and read timeouts
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
The issue identifies Http2Client and its synchronous and asynchronous execution paths, with reproduction against a local MockWebServer; no source or test file paths are given. Start by locating the Java 11 client timeout configuration and the existing zero timeout tests. Done means zero connect and read timeouts work across the described paths, while positive timeouts and negative value rejection remain unchanged.
索引モデルが issue の本文から書いたものです。
説明
Request.Options.connectTimeoutMillis() and readTimeoutMillis() document 0 as no timeout, but the Java11 client passes zero durations directly to the JDK builders, which reject them.
On current master (fee42b49), a request with a zero read timeout throws IllegalArgumentException: Invalid duration: PT0S before being sent. A zero connect timeout also makes new Http2Client(options) fail. The same problem affects the synchronous and asynchronous execution paths, including a supplied native client with no connect timeout configured.
I reproduced this with the public Http2Client.execute methods against a local MockWebServer, using real Zulu 11.0.32.1 compilation and Temurin 25 test execution as required by the module's toolchains. Seven zero-timeout cases fail with IllegalArgumentException; both positive-timeout controls receive the expected HTTP response.
For example:
Options options = new Options(5000, TimeUnit.MILLISECONDS, 0, TimeUnit.MILLISECONDS, true);
Http2Client client = new Http2Client(options);
client.execute(request, options); // fails before sending the request
I am preparing a fix to omit the relevant JDK timeout setter for zero, and to treat an absent native connect timeout as matching zero. Positive timeout behavior and rejection of negative values will remain unchanged. This is separate from #3068's streaming response-body timeout question.
- 主要言語
- Java
- スター
- 9.8k
- フォーク
- 2k
- 平均マージ
- 1時間 15分
- マージ済み PR(30日)
- 39
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenFeign/feign のほかの issue
-
DefaultAsyncClient never completes the returned future when Client throws Error対応中かも @hutiefang76 が 10 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
Response.charset ignores charset after another Content-Type parameter対応中かも @hutiefang76 が 10 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
UriUtils ignores allowReservedCharacters=false when the input has no percent triplet対応中かも @hutiefang76 が 10 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Java11 Http2Client loses response header value order and duplicate occurrences対応中かも @hutiefang76 が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
Query values are split at literal commas or lost when arrays are used対応中かも @hutiefang76 が 11 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
OpenFeign/feign の issue をすべて見る
似ている issue
-
Component: Frontend Component: Web Component Type: Maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
it-at-m/refarch-templates#1944 ·
メンテナーはふだん 2 日以内に返信
-
priority: p2 type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
googleapis/java-genai#1372 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
-
GeoSeries scale and skew tests fail with pytest 9.2.0対応中かも @jiayuasu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
carlos-emr/carlos#5431 ·
メンテナーはふだん 1 日以内に返信