Norbi
06/23/2023, 1:05 PMException in thread "main" io.ktor.client.call.NoTransformationFoundException: No transformation found: class io.ktor.utils.io.ByteBufferChannel -> class io.ktor.client.plugins.websocket.DefaultClientWebSocketSession
with response from <http://localhost:10150/remoting/websocket>:
status: 400 Bad Request
response headers:
content-length: 0
Aleksei Tirman [JB]
06/23/2023, 2:35 PMAleksei Tirman [JB]
06/23/2023, 2:36 PMNorbi
06/23/2023, 4:16 PMtestApplication()
and the tests run as expected. But when I switched to Netty server and CIO/Java client, the client receives the above mentioned 400 error when connecting using websockets :(Norbi
06/23/2023, 4:42 PM...
/remoting/websocket/(method:GET), segment:2 -> SUCCESS @ /remoting/websocket/(method:GET)
/remoting/websocket/(method:GET)/(header:Connection = Upgrade), segment:2 -> FAILURE "Selector didn't match" @ /remoting/websocket/(method:GET)/(header:Connection = Upgrade)
Does it mean that the client should send a Connection=Upgrade
header but it does not?
The client log contains this:
2023-06-23 18:51:21,026 TRACE [ktor-client-java-3] i.k.client.plugins.websocket.WebSockets - Skipping WebSocket plugin for non-websocket request: <http://localhost:10150/remoting/websocket>
I'm confused, the client tries to connect using httpClient.webSocketSession()
, why does this call result in a non-websocket request?Norbi
06/23/2023, 4:55 PMws://
protocol, I used http://
:(