The browser doesn't support sending custom headers in web sockets. WebSocketClient.connect() is documented to fail with IllegalArgumentException when passing custom headers to an implementation that doesn't support them, but it doesn't fail with Ktor - it simply ignores the headers.
What happened?
The browser doesn't support sending custom headers in web sockets.
WebSocketClient.connect()
is documented to fail withIllegalArgumentException
when passing custom headers to an implementation that doesn't support them, but it doesn't fail with Ktor - it simply ignores the headers.Reproduction and additional details
No response
Krossbow version
5.12.0
Krossbow modules
krossbow-websocket-ktor
Kotlin version
1.9.22
Kotlin target platforms
JS (browser)