RFR: 8368695: Support 101 switching protocol in jdk.httpserver [v3]

Michael McMahon michaelm at openjdk.org
Tue Oct 14 13:07:07 UTC 2025


On Mon, 13 Oct 2025 16:07:22 GMT, Josiah Noel <duke at openjdk.org> wrote:

> Don't get me wrong though, if you guys decide you want to fully support websocket, I'll gladly offer a PR. (But I highly doubt such a thing will happen)

Right, I don't think we want to support websocket. There are plenty of third party implementations out there and it's a bit too far removed from the purpose as a lightweight server, for serving mainly static content.

However, if we were to allow this enabling functionality, it would have to be documented and specified, so that other people could use it. I'd have preferred if the general shape of such an "upgrade API" was discussed on the net-dev email list but we can discuss it here, without prejudice to whether it goes ahead or not.

As a minimum, the feature would have to be "opt in" by the handler, probably through a new method on HttpExchange and we have to consider the impact on the rest of the API, such as what happens when HttpServer.stop is called.

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

PR Comment: https://git.openjdk.org/jdk/pull/27751#issuecomment-3401701954


More information about the net-dev mailing list