* Actions were not considered in HandleRequest

git-svn-id: trunk@38401 -
This commit is contained in:
michael 2018-03-03 16:20:12 +00:00
parent c6af4e42c0
commit c5348196cf

View File

@ -506,6 +506,7 @@ type
Public
Constructor Create(AOwner : TComponent);override;
Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); override;
Property Document : THTMLDocument Read FDocument;
end;
TFPHTMLModule=Class(TCustomHTMLModule)
@ -1167,13 +1168,21 @@ begin
If Assigned(OnGetContent) then
OnGetContent(Self,ARequest,FWriter,B);
If Not B then
Raise EHTMLError.Create(SErrRequestNotHandled);
If (AResponse.ContentStream=Nil) then
begin
M:=TMemoryStream.Create;
AResponse.ContentStream:=M;
Actions.HandleRequest(ARequest,FWriter,B);
If Not B then
Raise EHTMLError.Create(SErrRequestNotHandled);
end
else
begin
If (AResponse.ContentStream=Nil) then
begin
M:=TMemoryStream.Create;
AResponse.ContentStream:=M;
AResponse.FreeContentStream:=True;
FDocument.SaveToStream(AResponse.ContentStream);
end;
end;
FDocument.SaveToStream(AResponse.ContentStream);
Finally
FreeAndNil(FWriter);
end;