Browse Source

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

git-svn-id: trunk@16874 -
michael 14 years ago
parent
commit
f5cac5fcbc
1 changed files with 7 additions and 1 deletions
  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);
   InitSession(AResponse);
   If Assigned(FOnRequest) then
   If Assigned(FOnRequest) then
     FOnRequest(Self,ARequest,AResponse,B);
     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
     if FTemplate.HasContent then
       GetTemplateContent(ARequest,AResponse)
       GetTemplateContent(ARequest,AResponse)
     else
     else
@@ -460,6 +465,7 @@ begin
       If Not B then
       If Not B then
         Raise EFPWebError.Create(SErrRequestNotHandled);
         Raise EFPWebError.Create(SErrRequestNotHandled);
       end;
       end;
+      
   DoAfterResponse(AResponse);
   DoAfterResponse(AResponse);
   UpdateSession(AResponse);
   UpdateSession(AResponse);
   FRequest := Nil;
   FRequest := Nil;