mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:29:27 +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;
|
||||
|
||||
implementation
|
||||
type
|
||||
|
||||
{ TWebSessionFactory }
|
||||
|
||||
TWebSessionFactory = Class(TIniSessionFactory)
|
||||
Protected
|
||||
Function DoCreateSession(ARequest : TRequest) : TCustomSession; override;
|
||||
end;
|
||||
|
||||
|
||||
Function GetDefaultSession : TCustomSession;
|
||||
|
||||
@ -73,8 +82,21 @@ begin
|
||||
{$ifdef cgidebug}SendMethodExit('GetDefaultSession');{$endif}
|
||||
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
|
||||
IniWebSessionClass:=TFPWebSession;
|
||||
SessionFactoryClass:=TWebSessionFactory;
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user