浏览代码

* Avoid error by checking if content was already sent

Michaël Van Canneyt 2 年之前
父节点
当前提交
860f2f88e6
共有 1 个文件被更改,包括 2 次插入1 次删除
  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 }