This PR solves the problem when websockets is not able to reconnect due to expired session. Instead of noop, it now redirects users to a login screen to renew the session.
If the status code received from the server is not 101, the client handles the response per HTTP [RFC2616] procedures. In particular, the client might perform authentication if it receives a 401 status code; the server might redirect the client using a 3xx status code (but clients are not required to follow them), etc. Otherwise, proceed as follows.
Clients (browser in our case) are not required to follow HTTP redirects, so they do not. For that reason, redirect request is sent as payload which is then handled manually.
@geomodular would you mind having a look at the code once you have time?
This PR solves the problem when websockets is not able to reconnect due to expired session. Instead of noop, it now redirects users to a login screen to renew the session.
As per WS spec:
Clients (browser in our case) are not required to follow HTTP redirects, so they do not. For that reason, redirect request is sent as payload which is then handled manually.
@geomodular would you mind having a look at the code once you have time?