Zlib exception when calling response.free

After Installing sparkle (3.27.1.2) on D12 I am getting an exception "http response stream cannot change position" due to the (TZDecompressionStream.Destroy) as I have requested 'gzip' so procedure THttpResponse.PrepareResponse creates TZDecompressionStream
FContentStream := TZDecompressionStream.Create(FWrappedStream, 31);

destructor TZDecompressionStream.Destroy;
begin
inflateEnd(FZStream);
if FOwnsStream then
FStream.Free
else
try
FStream.Position := FStreamPos - FZStream.avail_in;
except
end;
inherited Destroy;
end;

My prior version of Sparkle (cannot remember what that was) and D11 did not do this

this is the same issue as the one below and the fix provided works

Thank you for the feedback, the fix will be included in the next release.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.