You are not logged in.
Pages: 1
mormot.net.ws.client
1、line 308, THttpClientWebSockets.WebSocketsConnect
result := Open(aHost, aPort);
this code does NOT support WSS connection(443 port or other port with ssl),need some method to auto select is ws or wss
2、line 464,465 ,THttpClientWebSockets.WebSocketsUpgrade
prot := HeaderGetValue('SEC-WEBSOCKET-PROTOCOL');
result := 'Invalid HTTP Upgrade Header';
if not (hfConnectionUpgrade in Http.HeaderFlags) or
(Http.ContentLength > 0) or
not PropNameEquals(Http.Upgrade, 'websocket') or
not aProtocol.SetSubprotocol(prot) then
exit;
aProtocol.Name := prot;
most 3rd party ws server does NOT return SEC-WEBSOCKET-PROTOCOL header(aProtocol.SetSubprotocol(prot) =false), for more capability, we should not check this header, also ,this check has no use except setting the protocol name where we can define by hand.
Last edited by keinn (2023-06-13 02:15:54)
Offline
Please try
1. https://github.com/synopse/mORMot2/commit/cb17fcca
2. SetSubProtocol() allows to switch e.g. between synopse binary or synopse JSON content from the client side. So it is of use.
You can set aProtocol.Name to '' for such servers.
Offline
Pages: 1