You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-11-23 21:34:53 +02:00
Dump header information in SimpleServer demo
This commit is contained in:
@@ -14,7 +14,7 @@ uses
|
|||||||
Controls, Forms, Dialogs, StdCtrls, Spin, ExtCtrls, Math,
|
Controls, Forms, Dialogs, StdCtrls, Spin, ExtCtrls, Math,
|
||||||
ShellAPI,
|
ShellAPI,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFInterfaces, uCEFServerComponent, uCEFTypes, uCEFMiscFunctions;
|
uCEFInterfaces, uCEFServerComponent, uCEFTypes, uCEFMiscFunctions, uCEFStringMultimap;
|
||||||
|
|
||||||
type
|
type
|
||||||
TSimpleServerFrm = class(TForm)
|
TSimpleServerFrm = class(TForm)
|
||||||
@@ -140,6 +140,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimpleServerFrm.ShowRequestInfo(const aRequest : ICefRequest);
|
procedure TSimpleServerFrm.ShowRequestInfo(const aRequest : ICefRequest);
|
||||||
|
var
|
||||||
|
TempHeaderMap : ICefStringMultimap;
|
||||||
|
i : NativeUInt;
|
||||||
begin
|
begin
|
||||||
if (aRequest = nil) then exit;
|
if (aRequest = nil) then exit;
|
||||||
|
|
||||||
@@ -149,6 +152,15 @@ begin
|
|||||||
if (length(aRequest.ReferrerUrl) > 0) then
|
if (length(aRequest.ReferrerUrl) > 0) then
|
||||||
ConnectionLogMem.Lines.Add('Request Referrer : ' + aRequest.ReferrerUrl);
|
ConnectionLogMem.Lines.Add('Request Referrer : ' + aRequest.ReferrerUrl);
|
||||||
|
|
||||||
|
TempHeaderMap := TCefStringMultimapOwn.Create;
|
||||||
|
aRequest.GetHeaderMap(TempHeaderMap);
|
||||||
|
i := 0;
|
||||||
|
while (i < TempHeaderMap.Size) do
|
||||||
|
begin
|
||||||
|
ConnectionLogMem.Lines.Add('HTTP header : ' + TempHeaderMap.Key[i] + ':' + TempHeaderMap.Value[i]);
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
|
||||||
ShowPostDataInfo(aRequest.PostData);
|
ShowPostDataInfo(aRequest.PostData);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"UpdateLazPackages" : [
|
"UpdateLazPackages" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : true,
|
"ForceNotify" : true,
|
||||||
"InternalVersion" : 817,
|
"InternalVersion" : 818,
|
||||||
"Name" : "cef4delphi_lazarus.lpk",
|
"Name" : "cef4delphi_lazarus.lpk",
|
||||||
"Version" : "142.0.8"
|
"Version" : "142.0.8"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user