-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ws.upgradeReq is undefined #1114
Comments
Oh, I just noticed version 3.0.0 does not have upgradeReq anymore #1099. That is really a major breaking change.. |
It's one of the breaking changes of version 3. See discussion in #1099 and release notes. |
That is unfortunate, I will use version 2.3.1 then. Thanks. |
I'll reopen so ppl hopefully see this and don't open new issues for this. |
@Droppers in the definition of your Thing.prototype.onWebSocketOpen = function onWebSocketOpen(ws, req) {
ws.upgradeReq = req;
// ...
} |
an optimization in version 3.0 of the required proxy server [ websockets/ws#1114 ]drops the upgradeReq parameter to save 20% in memory. This breaks non-http(s) requests that use upgrade to switch - like web sockets (ws and wss). This was never a consideration for he mitm proxy (I guess since the package specifies version 3.2 and up - so it never worked). This matters for me so we re include it per the recommendation from the package maintainers [ websockets/ws#1099 ]
Hello,
I am using the WS module, version 3.0.0. When I connect to the server I created, upgradeReq is undefined.
I am creating the server like this:
Maybe I am missing something?
The text was updated successfully, but these errors were encountered: