Open
Description
Questions
Header Sec-WebSocket-Extension is used to negotiate the list of supported extensions between WebSocket client and server.
In Websocket response 101 Switch Protocols, even origin server returns without permessage-deflate extension, vertx-http-server proxies websocket message to orign server permessage-deflated.
Undoubly, it will not be functional as orgin server doesn't not support that extension.
Version
Which version(s) did you encounter this bug ?
4.3.5
Context
Do you have a reproducer?
Steps to reproduce
- create a new proxy project with below options:
val proxyClient: HttpClient = vertx.createHttpClient()
val proxyOptions = ProxyOptions()
proxyOptions.supportWebSocket = true
val proxy = HttpProxy.reverseProxy(proxyOptions, proxyClient)
proxy.origin(30000, "localhost")
val options = HttpServerOptions()
options.addWebSocketSubProtocol("tty")
vertx
.createHttpServer(options)
.requestHandler(proxy)
.listen(8888) { http ->
if (http.succeeded()) {
startPromise.complete()
println("HTTP server started on port 8888")
} else {
startPromise.fail(http.cause());
}
}
-
downlown and execute ttyd
ttyd is an open source project to serve terminal in Web interface.
Download from https://github.com/tsl0922/ttyd/releases and run with command./ttyd -p 30000 -b /ttyd bash
Extra
As a workaround, I turn off message compression:
options.setPerMessageWebSocketCompressionSupported(false)
- Anything that can be relevant such as OS version, JVM version