JDK-8331847 : Release Note: `HttpServer` No Longer Immediately Sends Response Headers
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 23
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2024-05-07
  • Updated: 2024-08-01
  • Resolved: 2024-06-13
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 23
23Resolved
Description
The HTTP server no longer immediately sends response headers if chunked mode is selected or if the response has a body. The previous behavior had the effect of slowing down response times due to delayed acknowledgments on some operating systems. With this change, the headers will be buffered and sent with the response body if one is expected. This should result in improved performance for certain kinds of responses. Note, it is advisable now to always close the HTTP exchange or response body stream to force the sending of the response headers and is required in all cases except where there is no response body.