소스 검색

* Avoid error by checking if content was already sent

Michaël Van Canneyt 2 년 전
부모
커밋
cdc6ff0a30
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 }