RFR: 8349670: HttpServer: sending interim responses fails after JDK-7026262 [v2]
Daniel Fuchs
dfuchs at openjdk.org
Tue Sep 23 14:34:37 UTC 2025
On Tue, 23 Sep 2025 13:59:38 GMT, Josiah Noel <duke at openjdk.org> wrote:
>> Following the guideline of the last comment on [JDK-8349670](https://bugs.openjdk.org/browse/JDK-8349670?focusedId=14794649&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14794649), resolves the issue where sending a 1xx status code would close the input stream, preventing the server from reading the body.
>>
>> - Adds a new flag checking if the incoming request is an upgrade request.
>> - When receiving an upgrade request, directly return the input/output stream
>> - When a 1xx status code is sent by `sendResponseHeaders`, the input/output streams will not be closed prematurely.
>> - sentHeaders will not be set to true when sending 1xx status codes
>
> Josiah Noel has updated the pull request incrementally with one additional commit since the last revision:
>
> address pr comments
Hi Josiah! Glad to see that the OCA verification finally went through!
It seems to me that this PR addresses two different problems:
1. attempting to fix sendResponseHeaders to support sending informational responses (1xx status - a bug fix)
2. attempting to add support for switching protocols to the HttpServer (a new functionality)
I believe it would be best to separate these two issues into two different PRs to avoid mixing them up.
I would suggest only addressing 1. in this PR and log an enhancement for 2.
With regard to supporting some way to support upgrading protocols in the HTTP server I believe more discussion will be needed.
best regards, -- daniel
-------------
PR Review: https://git.openjdk.org/jdk/pull/27069#pullrequestreview-3258310895
More information about the net-dev
mailing list