Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
Description
My application wants to use an external balancer for my websocket connections.
It is expected to work in the following way:
- My application connects to some websocket address, thinking it is the final websocket server.
- Actually, this address is the address of a load balancer.
- Load balancer allows establishing SSL connection and reads HTTP request (that is always sent as part of websocket handshake inside encrypted connection)
- The balancer answers to this request with an HTTP 302 response, reporting `Location: ...` in HTTP response headers.
- QT Websocket receives this 302 response and (if configured to do so) reconnects to the address in the `Location:` header. Ideally with some interception in application (i.e., to change URL somehow. For example, change https:// to wss:// or to ensure that URL is wss:// and not ws://)
Now it's impossible, since according to source code, QT Websocket client code does not handle 302 specifically.