Prechádzať zdrojové kódy

* Avoid error by checking if content was already sent

Michaël Van Canneyt 2 rokov pred
rodič
commit
cdc6ff0a30

+ 2 - 1
packages/fcl-web/src/jsonrpc/webjsonrpc.pp

@@ -400,7 +400,8 @@ begin
     AResponse.ContentLength:=AResponse.ContentStream.Size;
     R:=''; // Free up mem
     end;
-  AResponse.SendResponse;
+  if not (AResponse.HeadersSent and AResponse.ContentSent) then
+    AResponse.SendResponse;
 end;
 
 { TJSONRPCSessionContext }