While all supported browsers do appear to use Connection: Upgrade with capital U and Upgrade: websocket with all lower case "websocket", and so the case-sensitive matches to Upgrade and websocket in app.py:
will work fine in most cases, according to RFC6455 these values should be ASCII case-insensitive matches.
This does in fact lead to issues in practice when using matlab_proxy behind a reverse proxy where the reverse proxy may have rewritten Upgrade as upgrade (e.g. if you literally configured NGINX according to the instructions on https://nginx.org/en/docs/http/websocket.html). Of course the configuration can be changed such that the reverse proxy outputs Upgrade as well, but that should not be needed according to the RFC spec.
While all supported browsers do appear to use
Connection: Upgrade
with capital U andUpgrade: websocket
with all lower case "websocket", and so the case-sensitive matches toUpgrade
andwebsocket
inapp.py
:https://github.com/mathworks/matlab-proxy/blob/45276dcec6a809b99f903ed7c86f70f0bc19a2c0/matlab_proxy/app.py#L374-L378
will work fine in most cases, according to RFC6455 these values should be ASCII case-insensitive matches.
This does in fact lead to issues in practice when using matlab_proxy behind a reverse proxy where the reverse proxy may have rewritten
Upgrade
asupgrade
(e.g. if you literally configured NGINX according to the instructions on https://nginx.org/en/docs/http/websocket.html). Of course the configuration can be changed such that the reverse proxy outputs Upgrade as well, but that should not be needed according to the RFC spec.