1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-22 22:17:48 +02:00
Fixed an issue in SchemeRegistrationBrowser with big streams. Now THelloScheme.ReadResponse copies the stream in chunks correctly.
This commit is contained in:
Salvador Díaz Fau
2019-01-17 14:53:02 +01:00
parent 395e76afce
commit 9e12b2258b
4 changed files with 8 additions and 4 deletions

View File

@ -201,9 +201,11 @@ function THelloScheme.ReadResponse(const dataOut : Pointer;
begin
if (FStream <> nil) and (DataOut <> nil) then
begin
FStream.Seek(0, soFromBeginning);
// This function will be called several times because the stream is bigger
// than bytesToRead. Each time we will copy a chunk of the stream to
// DataOut.
BytesRead := FStream.Read(DataOut^, BytesToRead);
Result := True;
Result := (BytesRead > 0);
end
else
Result := False;