Pārlūkot izejas kodu

* Avoid error by checking if content was already sent

Michaël Van Canneyt 2 gadi atpakaļ
vecāks
revīzija
cdc6ff0a30
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      packages/fcl-web/src/jsonrpc/webjsonrpc.pp

+ 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 }