[X] I've searched for any related issues and avoided creating a duplicate issue.
Description
I tried to establish a connection to my server but kept getting stuck in readyState 0. After numerous unsuccessful attempts, I checked the logs on the backend, which showed that the User-Agent was null. As a workaround, I created a fake one, and it worked. This experience has motivated me to contribute to, or at least understand better, the reasons behind this issue. Perhaps we can collectively improve this library.
Is there an existing issue for this?
Description
I tried to establish a connection to my server but kept getting stuck in readyState 0. After numerous unsuccessful attempts, I checked the logs on the backend, which showed that the User-Agent was null. As a workaround, I created a fake one, and it worked. This experience has motivated me to contribute to, or at least understand better, the reasons behind this issue. Perhaps we can collectively improve this library.
ws version
lts
Node.js Version
v20.10.0
System
System: OS: macOS 13.2 CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700K Memory: 584.47 MB / 32.00 GB Shell: 5.8.1 - /bin/zsh
Expected result
Having a default User-Agent? Or maybe it's unneccessary.
Actual result
Stucking in readyState 0(CONNECTING), actually the reason is the backend check the Headers to find the
User-Agent
.Attachments
No response