mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 23:19:24 +02:00
* RFC states that client must use mask: enforce mask on connect
This commit is contained in:
parent
5469199726
commit
a5f49c1cef
@ -294,6 +294,9 @@ begin
|
||||
FConnection:=CreateClientConnection(FTransport);
|
||||
FConnection.OnMessageReceived:=@MessageReceived;
|
||||
FConnection.OnControl:=@ControlReceived;
|
||||
// RFC states we MUST use a mask.
|
||||
if OutGoingFrameMask=0 then
|
||||
OutGoingFrameMask:=1+Random(MaxInt-1);
|
||||
FConnection.OutgoingFrameMask:=Self.OutGoingFrameMask;
|
||||
if UseSSL then
|
||||
FSocket.Connect;
|
||||
@ -389,7 +392,7 @@ end;
|
||||
|
||||
Function TCustomWebsocketClient.CheckHandShakeResponse(aHeaders : TStrings) : Boolean;
|
||||
|
||||
Var
|
||||
Var
|
||||
K : String;
|
||||
{%H-}hash : TSHA1Digest;
|
||||
B : TBytes;
|
||||
|
Loading…
Reference in New Issue
Block a user