mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 02:09:43 +02:00
* Safety for empty asJSON. Should not happen, but better safe than sorry
git-svn-id: trunk@42784 -
This commit is contained in:
parent
778ae03532
commit
b38596b925
@ -275,7 +275,8 @@ begin
|
||||
AResponse.FreeContentStream:=True;
|
||||
AResponse.ContentStream:=TMemoryStream.Create;
|
||||
R:=Res.AsJSON;
|
||||
AResponse.ContentStream.WriteBuffer(R[1],Length(R));
|
||||
if Length(R)>0 then
|
||||
AResponse.ContentStream.WriteBuffer(R[1],Length(R));
|
||||
AResponse.ContentLength:=AResponse.ContentStream.Size;
|
||||
R:=''; // Free up mem
|
||||
AResponse.ContentType:=GetResponseContentType;
|
||||
|
Loading…
Reference in New Issue
Block a user