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="stylesheet" href="/?mode=section&id=style.css" type="text/css">
<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>
[]

View File

@ -206,6 +206,12 @@
</Platforms>
<ModelSupport>False</ModelSupport>
<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">
<Platform Name="Win32">
<RemoteDir>.\</RemoteDir>
@ -225,12 +231,6 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="hfs.exe" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>hfs.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="OSX32">
<Operation>1</Operation>

View File

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

View File

@ -4923,7 +4923,6 @@ var
data.session.ip:=conn.address;
end;
end;
data.session.keepAlive();
if conn.request.user > '' then // priority
begin
data.user:=conn.request.user;
@ -5872,6 +5871,8 @@ case event of
// default case
else refreshConn(data);
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
begin
repaintTray();