Closed 4e6 closed 6 months ago
@4e6 Thanks for the report, yes it looks like that header is missing. Just to fully understand your scenario, you are using Helidon as a client of some third-party WS server right?
Yes, I would like to establish a connection with the Yjs server yjs/y-websocket.
Environment Details
Problem Description
When trying to create a WebSocket connection with
WsClient
, it fails to upgrade the connectionAccording to the Mozilla doc, a WebSocket upgrade request should contain two headers:
Debugging showed that the upgrade request sets the
Upgrade
header but is missing theConnection
one https://github.com/helidon-io/helidon/blob/68de0bb538483c5f76fdf78c686e273f15b4c684/webclient/http1/src/main/java/io/helidon/webclient/http1/Http1ClientRequestImpl.java#L130-L133After setting the
Connection
header (see the example below), the connection was successfully established.Steps to reproduce
This example results in an
io.helidon.webclient.websocket.WsClientException: Failed to upgrade to WebSocket.
After adding a
Connection
header, the connection is established successfully