Browse Source

* Introduced TCustomWebApplication.DoHandleRequest

git-svn-id: trunk@13735 -
joost 16 years ago
parent
commit
b52af4cd53
1 changed files with 11 additions and 7 deletions
  1. 11 7
      packages/fcl-web/src/custweb.pp

+ 11 - 7
packages/fcl-web/src/custweb.pp

@@ -98,7 +98,8 @@ Type
     Procedure CreateForm(AClass : TComponentClass; Var Reference : TComponent);
     Procedure CreateForm(AClass : TComponentClass; Var Reference : TComponent);
     Procedure Initialize; override;
     Procedure Initialize; override;
     Procedure ShowException(E: Exception);override;
     Procedure ShowException(E: Exception);override;
-    Procedure handleRequest(ARequest : TRequest; AResponse : TResponse); virtual;
+    Procedure DoHandleRequest(ARequest : TRequest; AResponse : TResponse);
+    Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); virtual;
     Property HandleGetOnPost : Boolean Read FHandleGetOnPost Write FHandleGetOnPost;
     Property HandleGetOnPost : Boolean Read FHandleGetOnPost Write FHandleGetOnPost;
     Property RedirectOnError : boolean Read FRedirectOnError Write FRedirectOnError;
     Property RedirectOnError : boolean Read FRedirectOnError Write FRedirectOnError;
     Property RedirectOnErrorURL : string Read FRedirectOnErrorURL Write FRedirectOnErrorURL;
     Property RedirectOnErrorURL : string Read FRedirectOnErrorURL Write FRedirectOnErrorURL;
@@ -134,12 +135,7 @@ begin
   while not Terminated do
   while not Terminated do
     begin
     begin
     if WaitForRequest(ARequest,AResponse) then
     if WaitForRequest(ARequest,AResponse) then
-      begin
-      HandleRequest(ARequest,AResponse);
-      If Not AResponse.ContentSent then
-        AResponse.SendContent;
-      EndRequest(ARequest,AResponse);
-      end;
+      DoHandleRequest(ARequest,AResponse);
     end;
     end;
 end;
 end;
 
 
@@ -298,6 +294,14 @@ begin
     Result:=Nil;
     Result:=Nil;
 end;
 end;
 
 
+procedure TCustomWebApplication.DoHandleRequest(ARequest: TRequest; AResponse: TResponse);
+begin
+  HandleRequest(ARequest,AResponse);
+  If Not AResponse.ContentSent then
+    AResponse.SendContent;
+  EndRequest(ARequest,AResponse);
+end;
+
 constructor TCustomWebApplication.Create(AOwner: TComponent);
 constructor TCustomWebApplication.Create(AOwner: TComponent);
 begin
 begin
   inherited Create(AOwner);
   inherited Create(AOwner);