RFR: 7026262: HttpServer: improve handling of finished HTTP exchanges [v2]

Michael McMahon michaelm at openjdk.org
Fri Mar 24 11:30:39 UTC 2023


On Fri, 24 Mar 2023 11:02:08 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> That was just a suggestion - I was a bit bothered with the hidden interaction between FixedLengthOutputStream and sendResponseHeaders here, where FixedLengthOutputStream has to trust that sendResponseHeaders has sent the event. It looked strange. Maybe there are other possibilities - like e.g a ZeroLengthOutputStream :-)
>
> I changed `sendResponseHeaders` to close the exchange, and I like the result much better. 
> `ExceptionKeepAlive` test no longer needs to explicitly close the request body before sending the response - exchange's `close` takes care of that.
> Let me know what you think.

I wonder should we move the code that sends the write finished event in this case to here? I agree this code looks pretty strange. Never mind. I see this has changed in the new revision.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13157#discussion_r1147451025


More information about the net-dev mailing list