Skip to content

Add WebSocket support to httpcore5-websocket#613

Open
arturobernalg wants to merge 1 commit intoapache:masterfrom
arturobernalg:HTTPCLIENT-973-websocket
Open

Add WebSocket support to httpcore5-websocket#613
arturobernalg wants to merge 1 commit intoapache:masterfrom
arturobernalg:HTTPCLIENT-973-websocket

Conversation

@arturobernalg
Copy link
Member

Improve server handling and add extensive core tests/examples Align client usage with core WebSocket APIs
Extend HTTP/2 request conversion and tests

@ok2c DefaultH2RequestConverter has a minimal RFC 8441 change (handling :protocol for CONNECT). This is required for H2 WebSocket server support. I tried to keep it separated, but was impossible.

Improve server handling and add extensive core tests/examples
Align client usage with core WebSocket APIs
Extend HTTP/2 request conversion and tests
@arturobernalg arturobernalg requested a review from ok2c February 5, 2026 17:52
@arturobernalg
Copy link
Member Author

A follow‑up PR will expose the client‑side pieces (see https://github.com/apache/httpcomponents-client/pull/762/changes).

@ok2c
Copy link
Member

ok2c commented Feb 7, 2026

@arturobernalg What is your plan? Do you want to provide the server side functionality out of the core project and the client side out of the client project? Should not the client protocol handler also go into core?

@arturobernalg
Copy link
Member Author

@arturobernalg What is your plan? Do you want to provide the server side functionality out of the core project and the client side out of the client project? Should not the client protocol handler also go into core?

@ok2c Plan is to keep server‑side WebSocket over H2 in core and client‑side in httpclient5. The client protocol handler is tied to the client execution stack and config, so it should stay in httpclient5. See apache/httpcomponents-client#762

@ok2c
Copy link
Member

ok2c commented Feb 7, 2026

@arturobernalg Interesting. How are you going to do integrations tests for the websocket protocol when it resides in two separate projects? The separation between core and client for HTTP protocol handlers is reasonably manageable: the message transport and the core protocol handling reside in core, advanced client functions reside in client. The core has integration tests that ensure correctness of the protocol handlers on both ends. in your case, I suspect the split into the server project and the client project will be hurting you in the long run. I do not know. This is your decision to make, but you may be better off having the server side websockets in the client project, at least for a few minor releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants