mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-03 14:37:24 +01:00
* Actions were not considered in HandleRequest
git-svn-id: trunk@38401 -
This commit is contained in:
parent
c6af4e42c0
commit
c5348196cf
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user