fix: session could expire during long download/upload

This commit is contained in:
Massimo Melina 2020-05-15 13:07:45 +02:00
parent 993f75214f
commit 6125e8a63b
4 changed files with 14 additions and 15 deletions

View File

@ -27,7 +27,7 @@ COMMENT with the ones above you can disable some features of the template. They
<link rel="shortcut icon" href="/favicon.ico"> <link rel="shortcut icon" href="/favicon.ico">
<link rel="stylesheet" href="/?mode=section&id=style.css" type="text/css"> <link rel="stylesheet" href="/?mode=section&id=style.css" type="text/css">
<script type="text/javascript" src="/?mode=jquery"></script> <script type="text/javascript" src="/?mode=jquery"></script>
<script>HFS = { user:'%user%', folder:'{.js encode|%folder%.}', sid:"{.cookie|HFS_SID_.}" }</script> <script>HFS = { user:'{.js encode|%user%.}', folder:'{.js encode|%folder%.}', sid:"{.cookie|HFS_SID_.}" }</script>
<script type="text/javascript" src="/?mode=section&id=lib.js"></script> <script type="text/javascript" src="/?mode=section&id=lib.js"></script>
[] []

View File

@ -206,6 +206,12 @@
</Platforms> </Platforms>
<ModelSupport>False</ModelSupport> <ModelSupport>False</ModelSupport>
<Deployment Version="3"> <Deployment Version="3">
<DeployFile LocalName="hfs.exe" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>hfs.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="hfs.dpr" Configuration="Debug" Class="ProjectFile"> <DeployFile LocalName="hfs.dpr" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32"> <Platform Name="Win32">
<RemoteDir>.\</RemoteDir> <RemoteDir>.\</RemoteDir>
@ -225,12 +231,6 @@
<Overwrite>true</Overwrite> <Overwrite>true</Overwrite>
</Platform> </Platform>
</DeployFile> </DeployFile>
<DeployFile LocalName="hfs.exe" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>hfs.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols"> <DeployClass Name="AdditionalDebugSymbols">
<Platform Name="OSX32"> <Platform Name="OSX32">
<Operation>1</Operation> <Operation>1</Operation>

View File

@ -294,7 +294,7 @@ object mainFrm: TmainFrm
object titlePnl: TPanel object titlePnl: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
Width = 341 Width = 337
Height = 23 Height = 23
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
@ -302,16 +302,16 @@ object mainFrm: TmainFrm
TabOrder = 0 TabOrder = 0
end end
object logToolbar: TPanel object logToolbar: TPanel
Left = 341 Left = 337
Top = 0 Top = 0
Width = 256 Width = 260
Height = 23 Height = 23
Align = alRight Align = alRight
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 1 TabOrder = 1
object collapsedPnl: TPanel object collapsedPnl: TPanel
Left = -4 Left = 0
Top = 0 Top = 0
Width = 21 Width = 21
Height = 23 Height = 23
@ -319,7 +319,6 @@ object mainFrm: TmainFrm
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 0 TabOrder = 0
ExplicitLeft = 0
object expandBtn: TSpeedButton object expandBtn: TSpeedButton
Left = 0 Left = 0
Top = 0 Top = 0
@ -352,7 +351,7 @@ object mainFrm: TmainFrm
end end
end end
object expandedPnl: TPanel object expandedPnl: TPanel
Left = 17 Left = 21
Top = 0 Top = 0
Width = 239 Width = 239
Height = 23 Height = 23
@ -360,7 +359,6 @@ object mainFrm: TmainFrm
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 1 TabOrder = 1
ExplicitLeft = 21
object openFilteredLog: TSpeedButton object openFilteredLog: TSpeedButton
Left = 213 Left = 213
Top = 0 Top = 0

View File

@ -4923,7 +4923,6 @@ var
data.session.ip:=conn.address; data.session.ip:=conn.address;
end; end;
end; end;
data.session.keepAlive();
if conn.request.user > '' then // priority if conn.request.user > '' then // priority
begin begin
data.user:=conn.request.user; data.user:=conn.request.user;
@ -5872,6 +5871,8 @@ case event of
// default case // default case
else refreshConn(data); else refreshConn(data);
end;//case end;//case
if assigned(data.session) then
data.session.keepAlive();
if event in [HE_CONNECTED, HE_DISCONNECTED, HE_OPEN, HE_CLOSE, HE_REQUESTED, HE_POST_END, HE_LAST_BYTE_DONE] then if event in [HE_CONNECTED, HE_DISCONNECTED, HE_OPEN, HE_CLOSE, HE_REQUESTED, HE_POST_END, HE_LAST_BYTE_DONE] then
begin begin
repaintTray(); repaintTray();