Closed h2g2bob closed 2 years ago
This has been fixed long ago in Werkzeug (see https://github.com/pallets/werkzeug/issues/2131), but there hasn't been a release to PyPi since then. You can install Werkzeug's main branch from GitHub to get this fix.
Werkzeug 2.0.2 has now been released with this fix.
flask-sock works on chrome, but not firefox
The cause (I think) is that, if you make a
new WebSocket(...)
, Firefox will send aConnection: keep-alive, Upgrade
header; while chrome will sendConnection: Upgrade
.A test case:
Using
example/echo.py
Example echo program gives HTTP 400 error when
Returns
But the same test, but altering the
Connection
line fromConnection: keep-alive, Upgrade
toConnection: Upgrade
gives a successful response:Thanks!