mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 20:00:19 +02:00
* Ensure backwards compatibility
git-svn-id: trunk@17503 -
This commit is contained in:
parent
1274fb68bf
commit
3ea608a6f4
@ -41,6 +41,15 @@ Var
|
|||||||
Function GetDefaultSession : TCustomSession;
|
Function GetDefaultSession : TCustomSession;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TWebSessionFactory }
|
||||||
|
|
||||||
|
TWebSessionFactory = Class(TIniSessionFactory)
|
||||||
|
Protected
|
||||||
|
Function DoCreateSession(ARequest : TRequest) : TCustomSession; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
Function GetDefaultSession : TCustomSession;
|
Function GetDefaultSession : TCustomSession;
|
||||||
|
|
||||||
@ -73,8 +82,21 @@ begin
|
|||||||
{$ifdef cgidebug}SendMethodExit('GetDefaultSession');{$endif}
|
{$ifdef cgidebug}SendMethodExit('GetDefaultSession');{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TWebSessionFactory }
|
||||||
|
|
||||||
|
function TWebSessionFactory.DoCreateSession(ARequest: TRequest
|
||||||
|
): TCustomSession;
|
||||||
|
begin
|
||||||
|
Result:=Nil;
|
||||||
|
if Assigned(OnGetDefaultSession) then
|
||||||
|
OnGetDefaultSession(Result);
|
||||||
|
if Result=Nil then
|
||||||
|
Result:=inherited DoCreateSession(ARequest);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
IniWebSessionClass:=TFPWebSession;
|
IniWebSessionClass:=TFPWebSession;
|
||||||
|
SessionFactoryClass:=TWebSessionFactory;
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user