Closed gitneko closed 3 years ago
Can you force disable permessage-deflate
in node.js?
The Node.js ws client documentation says that the extension is only enabled if the server supports it and it is enabled, which means that the extension must be negotiated before it is used (which is done by sending a HTTP header in the response to the initial HTTP request).
Which suggests to me, even though the server does not support it, it sends a RSV1 even though it's not enabled and negotiated. Looking at the code, the protocol implementation seems flawed to me. I'll report back after more investigation and testing.
On your server listing I don't see any RX FRAME
TX FRAME
I'm currently in the works of making this library work with MKR1000 and WiFi101 and I'm testing this with a Node.js websocket client. However whenever I try to send a message from Node.js, the connection will fail with
Invalid WebSocket frame: RSV1 must be clear
, which indicates this library setsRSV1
to one, even though no extension was actually negated (https://github.com/websockets/ws/issues/1140#issuecomment-308016758, https://tools.ietf.org/html/rfc6455#section-5.2).In my config.h I've uncommented the "debug macros"
And on the serial I can see the following getting printed (and that's all of it):
Node.js output:
Node.js client code:
I'm using a little more code for all my setup and peripheries, but this is a simplified version: