-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Support Upgrade
requests (Socket.IO)
#682
Comments
Here's the No interceptor
Interceptor applied
There are clearly differences, mostly:
|
How we handle request passthrough: interceptors/src/interceptors/ClientRequest/MockHttpSocket.ts Lines 153 to 257 in 0ce43e8
|
DiscoveryThe connection hands forever because EngineIO never receives the SocketIO expects the Since we are using
The messages the server receives in the working scenario are as follows (message (byteLength)):
In the case of a broken, interceptor scenario, the server only receives the initial
The callstack that leads to the
Here's a log of the receiver/sender events for the working scenario:
|
Root cause and the solutionThe root cause for this issue was that the mock socket never forwarded writes to the original The solution can be respect Edit: The actual solution implemented writes forwarding a bit differently so it doesn't interfere with writing to a regular HTTP request. |
Released: v0.37.3 🎉This has been released in v0.37.3! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
We don't seem to passthrough Socket.IO
Upgrade
HTTP request correctly. It gets stuck forever.The text was updated successfully, but these errors were encountered: