On Tue, 4 Apr 2023 17:02:08 GMT, Darragh Clarke <d...@openjdk.org> wrote:
> Currently it is possible for `HttpURLConnection` with the `Expect: > 100-Continue` header to timeout awaiting for a server response. According to > [RFC-7231](https://www.rfc-editor.org/rfc/rfc7231#section-5.1.1) a client > `SHOULD NOT wait for an indefinite period before sending the message body`. > > This PR changes the existing `expect100Continue` method to wait for a maximum > of 5 seconds for a server response, this will be shorter if a timeout is set. > If no response is received, the message is sent regardless. > > Tests have been added to account for different scenarios that currently > timeout, and the changes have been tested against tiers 1,2 and 3. This pull request has now been integrated. Changeset: 4b02956d Author: Darragh Clarke <darraghclark...@gmail.com> Committer: Daniel Jeliński <djelin...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/4b02956d42c29ce32894f15411d3abe12b07dccd Stats: 504 lines in 2 files changed: 465 ins; 6 del; 33 mod 8054022: HttpURLConnection timeouts with Expect: 100-Continue and no chunking Reviewed-by: djelinski, dfuchs ------------- PR: https://git.openjdk.org/jdk/pull/13330