diff --git a/demo/test.html b/demo/test.html new file mode 100644 index 00000000..9a44c15a --- /dev/null +++ b/demo/test.html @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/src/main/kotlin/io/emeraldpay/dshackle/proxy/WebsocketHandler.kt b/src/main/kotlin/io/emeraldpay/dshackle/proxy/WebsocketHandler.kt index 3882d05b..b1fb0d7a 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/proxy/WebsocketHandler.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/proxy/WebsocketHandler.kt @@ -27,7 +27,6 @@ import io.emeraldpay.dshackle.rpc.NativeSubscribe import io.emeraldpay.etherjar.rpc.json.RequestJson import io.emeraldpay.etherjar.rpc.json.ResponseJson import io.netty.buffer.ByteBufInputStream -import io.netty.buffer.Unpooled import org.reactivestreams.Publisher import org.slf4j.LoggerFactory import reactor.core.publisher.Flux @@ -74,9 +73,8 @@ class WebsocketHandler( val eventHandler = accessHandler.start(req, routeConfig.blockchain) val responses = respond(routeConfig.blockchain, control, requests, eventHandler) - .map { Unpooled.wrappedBuffer(it.toByteArray()) } - resp.send(responses) + resp.sendString(responses, Charsets.UTF_8) .then() } }