浏览代码

* 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;