mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 00:09:31 +02:00
* Reverted accidentally committed files in r12989
git-svn-id: trunk@12990 -
This commit is contained in:
parent
37dcbd6612
commit
49f2270221
@ -126,7 +126,6 @@ Var
|
||||
AlternateHandler : ap_hook_handler_t = Nil;
|
||||
|
||||
Implementation
|
||||
uses ctypes;
|
||||
|
||||
resourcestring
|
||||
SErrNoModuleNameForRequest = 'Could not determine HTTP module name for request';
|
||||
@ -208,15 +207,12 @@ Var
|
||||
Resp : TApacheResponse;
|
||||
|
||||
begin
|
||||
LogErrorMessage('Test 1',3);
|
||||
Req:=TApacheRequest.CreateReq(Self,P);
|
||||
Try
|
||||
Req.InitRequestVars;
|
||||
Resp:=TApacheResponse.CreateApache(Req);
|
||||
Try
|
||||
LogErrorMessage('Test 2',3);
|
||||
HandleRequest(Req,Resp);
|
||||
LogErrorMessage('Test 3',3);
|
||||
If Not Resp.ContentSent then
|
||||
Resp.SendContent;
|
||||
Finally
|
||||
@ -337,11 +333,9 @@ Var
|
||||
Var II:Integer;
|
||||
begin
|
||||
FCriticalSection.Enter;
|
||||
LogErrorMessage('Test I',3);
|
||||
try
|
||||
if (FMaxRequests>0) and (FWorkingWebModules.Count>=FMaxRequests) then
|
||||
Raise EFPApacheError.Create(SErrTooManyRequests);
|
||||
LogErrorMessage('Test II',3);
|
||||
if (FIdleWebModules.Count>0) then
|
||||
begin
|
||||
II := FIdleWebModules.Count - 1;
|
||||
@ -353,25 +347,18 @@ LogErrorMessage('Test II',3);
|
||||
FIdleWebModules.Delete(II);
|
||||
end;
|
||||
end;
|
||||
LogErrorMessage('Test III',3);
|
||||
if (M=nil) then
|
||||
begin
|
||||
LogErrorMessage('Test IV',3);
|
||||
if assigned(mc) then LogErrorMessage('Test ---',3);
|
||||
M:=MC.Create(Self);
|
||||
LogErrorMessage('Test V',3);
|
||||
M.Name := '';
|
||||
end;
|
||||
LogErrorMessage('Test VI',3);
|
||||
FWorkingWebModules.Add(M);
|
||||
finally
|
||||
FCriticalSection.Leave;
|
||||
end;
|
||||
LogErrorMessage('Test VII',3);
|
||||
end;
|
||||
|
||||
begin
|
||||
LogErrorMessage('Test a',3);
|
||||
try
|
||||
MC:=Nil;
|
||||
M := Nil;
|
||||
@ -390,11 +377,8 @@ LogErrorMessage('Test a',3);
|
||||
|
||||
MC:=MI.ModuleClass;
|
||||
end;
|
||||
LogErrorMessage('Test b',3);
|
||||
GetAWebModule;
|
||||
LogErrorMessage('Test c',3);
|
||||
M.HandleRequest(ARequest,AResponse);
|
||||
LogErrorMessage('Test d',3);
|
||||
|
||||
FCriticalSection.Enter;
|
||||
try
|
||||
@ -410,7 +394,6 @@ LogErrorMessage('Test d',3);
|
||||
ShowRequestException(AResponse,E);
|
||||
end;
|
||||
end;
|
||||
LogErrorMessage('Test e',3);
|
||||
end;
|
||||
|
||||
{ TApacheRequest }
|
||||
@ -593,7 +576,7 @@ begin
|
||||
end;
|
||||
|
||||
Initialization
|
||||
// BeginThread(@__dummythread);//crash prevention for simultaneous requests
|
||||
BeginThread(@__dummythread);//crash prevention for simultaneous requests
|
||||
sleep(300);
|
||||
|
||||
InitApache;
|
||||
|
@ -38,10 +38,10 @@ Type
|
||||
Procedure DoHandleRequest(ARequest : TRequest; AResponse : TResponse; Var Handled : Boolean); override;
|
||||
Procedure DoGetContent(ARequest : TRequest; Content : TStream; Var Handled : Boolean); virtual;
|
||||
Procedure GetContent(ARequest : TRequest; Content : TStream; Var Handled : Boolean);
|
||||
Procedure Assign(Source : TPersistent); override;
|
||||
Public
|
||||
Constructor create(ACollection : TCollection); override;
|
||||
Destructor destroy; override;
|
||||
Procedure Assign(Source : TPersistent); override;
|
||||
published
|
||||
Property Content : String Read GetStringContent Write SetContent;
|
||||
Property Contents : TStrings Read GetContents Write SetContents;
|
||||
@ -116,7 +116,7 @@ Type
|
||||
Procedure GetTemplateContent(ARequest : TRequest; AResponse : TResponse); virtual;
|
||||
function GetContent: String;virtual;
|
||||
Public
|
||||
Constructor Create(AOwner: TComponent); override;
|
||||
Constructor CreateNew(AOwner : TComponent; CreateMode : Integer); override;
|
||||
Destructor Destroy; override;
|
||||
Procedure HandleRequest(ARequest : TRequest; AResponse : TResponse); override;
|
||||
Property Actions : TFPWebActions Read FActions Write SetActions;
|
||||
@ -314,13 +314,12 @@ end;
|
||||
function TCustomFPWebModule.GetOnGetAction: TGetActionEvent;
|
||||
begin
|
||||
Result:=FActions.OnGetAction;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
procedure TCustomFPWebModule.SetActions(const AValue: TFPWebActions);
|
||||
begin
|
||||
if (FActions<>AValue) then
|
||||
if (FActions<>AValue) then;
|
||||
FActions.Assign(AValue);
|
||||
end;
|
||||
|
||||
@ -398,20 +397,20 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TCustomFPWebModule.Create(AOwner: TComponent);
|
||||
constructor TCustomFPWebModule.CreateNew(AOwner: TComponent; CreateMode : Integer);
|
||||
begin
|
||||
inherited;
|
||||
FActions:=TFPWebActions.Create(TFPWebAction);
|
||||
FTemplate:=TFPWebTemplate.Create(Self);
|
||||
FTemplateVars:=TTemplateVars.Create(TTemplateVar);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
destructor TCustomFPWebModule.Destroy;
|
||||
begin
|
||||
inherited Destroy;
|
||||
FreeAndNil(FTemplateVars);
|
||||
FreeAndNil(FTemplate);
|
||||
FreeAndNil(FActions);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user