소스 검색

* If request handled correctly, send content if it was not yet sent

git-svn-id: trunk@16874 -
michael 14 년 전
부모
커밋
f5cac5fcbc
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      packages/fcl-web/src/base/fpweb.pp

+ 7 - 1
packages/fcl-web/src/base/fpweb.pp

@@ -449,7 +449,12 @@ begin
   InitSession(AResponse);
   If Assigned(FOnRequest) then
     FOnRequest(Self,ARequest,AResponse,B);
-  If Not B then
+  If B then
+    begin
+    if not AResponse.ContentSent then
+      AResponse.SendContent;
+    end
+  else
     if FTemplate.HasContent then
       GetTemplateContent(ARequest,AResponse)
     else
@@ -460,6 +465,7 @@ begin
       If Not B then
         Raise EFPWebError.Create(SErrRequestNotHandled);
       end;
+      
   DoAfterResponse(AResponse);
   UpdateSession(AResponse);
   FRequest := Nil;