mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-02 21:57:37 +02:00
ResponseFilterBrowser now downloads the resource 1 time after the user clicks the GO button
This commit is contained in:
parent
8000e45198
commit
ee61ac3c7b
@ -50,7 +50,7 @@ object ResponseFilterBrowserFrm: TResponseFilterBrowserFrm
|
||||
Margins.Right = 5
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
Text = 'https://www.briskbard.com'
|
||||
Text = 'https://www.wikipedia.org/'
|
||||
ExplicitHeight = 21
|
||||
end
|
||||
object Panel1: TPanel
|
||||
@ -88,7 +88,7 @@ object ResponseFilterBrowserFrm: TResponseFilterBrowserFrm
|
||||
Height = 20
|
||||
Align = alRight
|
||||
TabOrder = 1
|
||||
Text = 'script.js'
|
||||
Text = 'index-475f3bca23.js'
|
||||
ExplicitHeight = 21
|
||||
end
|
||||
end
|
||||
|
@ -298,19 +298,19 @@ var
|
||||
TempHeader : string;
|
||||
TempLen : integer;
|
||||
begin
|
||||
if (response <> nil) and IsMyResource(request) then
|
||||
begin
|
||||
Result := FFilter;
|
||||
TempHeader := trim(response.GetHeader('Content-Length'));
|
||||
if not(FRscCompleted) and (response <> nil) and IsMyResource(request) then
|
||||
begin
|
||||
Result := FFilter;
|
||||
TempHeader := trim(response.GetHeader('Content-Length'));
|
||||
|
||||
if TryStrToInt(TempHeader, TempLen) and (TempLen > 0) then
|
||||
FRscSize := TempLen
|
||||
else
|
||||
FRscSize := -1;
|
||||
if TryStrToInt(TempHeader, TempLen) and (TempLen > 0) then
|
||||
FRscSize := TempLen
|
||||
else
|
||||
FRscSize := -1;
|
||||
|
||||
UpdateRscEncoding(response.MimeType, response.GetHeader('Content-Type'));
|
||||
end
|
||||
else
|
||||
UpdateRscEncoding(response.MimeType, response.GetHeader('Content-Type'));
|
||||
end
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
@ -398,7 +398,6 @@ begin
|
||||
|
||||
FStream.Clear;
|
||||
FRscSize := -1;
|
||||
FRscCompleted := False;
|
||||
end
|
||||
else
|
||||
Memo1.Lines.Clear;
|
||||
@ -409,6 +408,7 @@ end;
|
||||
|
||||
procedure TResponseFilterBrowserFrm.GoBtnClick(Sender: TObject);
|
||||
begin
|
||||
FRscCompleted := False;
|
||||
Chromium1.LoadURL(AddressEdt.Text);
|
||||
end;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user