JDK-8292044 : HttpClient doesn't handle 102 or 103 properly
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 11,17,19
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2022-08-08
  • Updated: 2024-08-09
  • Resolved: 2022-09-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17 JDK 20
11.0.25Fixed 17.0.13Fixed 20 b17Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
When the HttpClient receives a response with 102 or 103 it simply returns that response to the caller and considers the exchange done. This leaves the caller in a bind as it can't receive the final 200 response.

A minimal fix (backportable) would be to ignore the 102 or 103 response and wait for the final 200 response.

For the mainline we should probably add a new no-op method with an empty default body to the BodyHandler interface to give the caller a chance to intercept the 1xx response.
Comments
jdk11u-dev backport request I would like to have the patch in jdk11u-dev as well, because the issue is present there too. The backport needs small adjustments and is medium risk.
09-08-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk11u-dev/pull/2896 Date: 2024-08-06 11:45:58 +0000
06-08-2024

jdk17u-dev backport request I would like to have the patch in jdk17u-dev as well, because the issue is present there too. The backport needs small adjustments (test does not work out of the box) and is medium risk.
01-08-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk17u-dev/pull/2753 Date: 2024-07-31 12:16:41 +0000
31-07-2024

> For the mainline we should probably add a new no-op method with an empty default body to the BodyHandler interface to give the caller a chance to intercept the 1xx response. I've created https://bugs.openjdk.org/browse/JDK-8294196 to track this.
22-09-2022

Changeset: 800e68d6 Author: Jaikiran Pai <jpai@openjdk.org> Date: 2022-09-22 09:18:22 +0000 URL: https://git.openjdk.org/jdk/commit/800e68d6906734242119e4ea033422f037a79857
22-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10169 Date: 2022-09-05 13:36:04 +0000
05-09-2022