accept session/cookie through URL

This commit is contained in:
Massimo Melina 2020-05-14 11:40:24 +02:00
parent 34d4adf0c3
commit 8a622be58d
6 changed files with 688 additions and 625 deletions

BIN
data.RES

Binary file not shown.

View File

@ -206,9 +206,9 @@
</Platforms> </Platforms>
<ModelSupport>False</ModelSupport> <ModelSupport>False</ModelSupport>
<Deployment Version="3"> <Deployment Version="3">
<DeployFile LocalName="hfs.exe" Configuration="Release" Class="ProjectOutput"> <DeployFile LocalName="hfs.dpr" Configuration="Debug" Class="ProjectFile">
<Platform Name="Win32"> <Platform Name="Win32">
<RemoteName>hfs.exe</RemoteName> <RemoteDir>.\</RemoteDir>
<Overwrite>true</Overwrite> <Overwrite>true</Overwrite>
</Platform> </Platform>
</DeployFile> </DeployFile>
@ -219,15 +219,15 @@
<Overwrite>true</Overwrite> <Overwrite>true</Overwrite>
</Platform> </Platform>
</DeployFile> </DeployFile>
<DeployFile LocalName="hfs.exe" Configuration="Debug" Class="ProjectOutput"> <DeployFile LocalName="hfs.exe" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win32"> <Platform Name="Win32">
<RemoteName>hfs.exe</RemoteName> <RemoteName>hfs.exe</RemoteName>
<Overwrite>true</Overwrite> <Overwrite>true</Overwrite>
</Platform> </Platform>
</DeployFile> </DeployFile>
<DeployFile LocalName="hfs.dpr" Configuration="Debug" Class="ProjectFile"> <DeployFile LocalName="hfs.exe" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32"> <Platform Name="Win32">
<RemoteDir>.\</RemoteDir> <RemoteName>hfs.exe</RemoteName>
<Overwrite>true</Overwrite> <Overwrite>true</Overwrite>
</Platform> </Platform>
</DeployFile> </DeployFile>

1258
hfs.drc

File diff suppressed because it is too large Load Diff

View File

@ -78,8 +78,6 @@ object mainFrm: TmainFrm
ParentFont = False ParentFont = False
ShowCaptions = True ShowCaptions = True
TabOrder = 1 TabOrder = 1
ExplicitWidth = 783
ExplicitHeight = 55
object menuBtn: TToolButton object menuBtn: TToolButton
Left = 0 Left = 0
Top = 0 Top = 0
@ -191,8 +189,6 @@ object mainFrm: TmainFrm
ShowCaptions = True ShowCaptions = True
TabOrder = 2 TabOrder = 2
Wrapable = False Wrapable = False
ExplicitTop = 55
ExplicitWidth = 783
object browseBtn: TToolButton object browseBtn: TToolButton
Left = 0 Left = 0
Top = 0 Top = 0
@ -232,9 +228,6 @@ object mainFrm: TmainFrm
Font.Style = [] Font.Style = []
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
ExplicitTop = 114
ExplicitWidth = 783
ExplicitHeight = 277
object splitV: TSplitter object splitV: TSplitter
Left = 313 Left = 313
Top = 0 Top = 0
@ -268,8 +261,6 @@ object mainFrm: TmainFrm
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 1 TabOrder = 1
ExplicitWidth = 467
ExplicitHeight = 166
object logBox: TRichEdit object logBox: TRichEdit
Left = 0 Left = 0
Top = 23 Top = 23
@ -291,8 +282,6 @@ object mainFrm: TmainFrm
Zoom = 100 Zoom = 100
OnChange = logBoxChange OnChange = logBoxChange
OnMouseDown = logBoxMouseDown OnMouseDown = logBoxMouseDown
ExplicitWidth = 467
ExplicitHeight = 143
end end
object logTitle: TPanel object logTitle: TPanel
Left = 0 Left = 0
@ -302,7 +291,6 @@ object mainFrm: TmainFrm
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 1 TabOrder = 1
ExplicitWidth = 467
object titlePnl: TPanel object titlePnl: TPanel
Left = 0 Left = 0
Top = 0 Top = 0
@ -312,7 +300,6 @@ object mainFrm: TmainFrm
BevelOuter = bvNone BevelOuter = bvNone
Caption = 'Log' Caption = 'Log'
TabOrder = 0 TabOrder = 0
ExplicitWidth = 211
end end
object logToolbar: TPanel object logToolbar: TPanel
Left = 341 Left = 341
@ -323,9 +310,8 @@ object mainFrm: TmainFrm
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 1 TabOrder = 1
ExplicitLeft = 211
object collapsedPnl: TPanel object collapsedPnl: TPanel
Left = 0 Left = -4
Top = 0 Top = 0
Width = 21 Width = 21
Height = 23 Height = 23
@ -333,6 +319,7 @@ 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
@ -365,16 +352,17 @@ object mainFrm: TmainFrm
end end
end end
object expandedPnl: TPanel object expandedPnl: TPanel
Left = 21 Left = 17
Top = 0 Top = 0
Width = 235 Width = 239
Height = 23 Height = 23
Align = alRight Align = alRight
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 1 TabOrder = 1
ExplicitLeft = 21
object openFilteredLog: TSpeedButton object openFilteredLog: TSpeedButton
Left = 209 Left = 213
Top = 0 Top = 0
Width = 26 Width = 26
Height = 23 Height = 23
@ -439,7 +427,7 @@ object mainFrm: TmainFrm
OnClick = openLogBtnClick OnClick = openLogBtnClick
end end
object openLogBtn: TSpeedButton object openLogBtn: TSpeedButton
Left = 183 Left = 187
Top = 0 Top = 0
Width = 26 Width = 26
Height = 23 Height = 23
@ -486,7 +474,7 @@ object mainFrm: TmainFrm
OnClick = openLogBtnClick OnClick = openLogBtnClick
end end
object collapseBtn: TSpeedButton object collapseBtn: TSpeedButton
Left = -4 Left = 0
Top = 0 Top = 0
Width = 21 Width = 21
Height = 23 Height = 23
@ -513,18 +501,16 @@ object mainFrm: TmainFrm
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
OnClick = collapseBtnClick OnClick = collapseBtnClick
ExplicitLeft = 0
end end
object Bevel1: TBevel object Bevel1: TBevel
Left = 17 Left = 21
Top = 0 Top = 0
Width = 2 Width = 2
Height = 23 Height = 23
Align = alRight Align = alRight
ExplicitLeft = 21
end end
object searchPnl: TPanel object searchPnl: TPanel
Left = 19 Left = 23
Top = 0 Top = 0
Width = 164 Width = 164
Height = 23 Height = 23
@ -533,7 +519,6 @@ object mainFrm: TmainFrm
BevelOuter = bvNone BevelOuter = bvNone
Padding.Left = 5 Padding.Left = 5
TabOrder = 0 TabOrder = 0
ExplicitLeft = 23
DesignSize = ( DesignSize = (
164 164
23) 23)
@ -579,7 +564,6 @@ object mainFrm: TmainFrm
BevelOuter = bvNone BevelOuter = bvNone
Caption = 'filesPnl' Caption = 'filesPnl'
TabOrder = 0 TabOrder = 0
ExplicitHeight = 166
object filesBox: TTreeView object filesBox: TTreeView
Left = 0 Left = 0
Top = 23 Top = 23
@ -620,7 +604,6 @@ object mainFrm: TmainFrm
OnMouseEnter = filesBoxMouseEnter OnMouseEnter = filesBoxMouseEnter
OnMouseLeave = filesBoxMouseLeave OnMouseLeave = filesBoxMouseLeave
OnMouseUp = filesBoxMouseUp OnMouseUp = filesBoxMouseUp
ExplicitHeight = 143
end end
object filesTitle: TPanel object filesTitle: TPanel
Left = 0 Left = 0
@ -641,8 +624,6 @@ object mainFrm: TmainFrm
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
TabOrder = 2 TabOrder = 2
ExplicitTop = 171
ExplicitWidth = 783
object sbar: TStatusBar object sbar: TStatusBar
Left = 0 Left = 0
Top = 87 Top = 87
@ -654,7 +635,6 @@ object mainFrm: TmainFrm
end> end>
OnDblClick = sbarDblClick OnDblClick = sbarDblClick
OnMouseDown = sbarMouseDown OnMouseDown = sbarMouseDown
ExplicitWidth = 783
end end
object connBox: TListView object connBox: TListView
Left = 0 Left = 0
@ -706,7 +686,6 @@ object mainFrm: TmainFrm
ViewStyle = vsReport ViewStyle = vsReport
OnAdvancedCustomDrawSubItem = connBoxAdvancedCustomDrawSubItem OnAdvancedCustomDrawSubItem = connBoxAdvancedCustomDrawSubItem
OnData = connBoxData OnData = connBoxData
ExplicitWidth = 886
end end
end end
end end

View File

@ -4892,6 +4892,8 @@ var
if data.session = NIL then if data.session = NIL then
begin begin
sid:=conn.getCookie(SESSION_COOKIE); sid:=conn.getCookie(SESSION_COOKIE);
if sid = '' then
sid:=data.urlvars.Values[SESSION_COOKIE];
if sid = '' then if sid = '' then
begin begin
data.session:=Tsession.create(); data.session:=Tsession.create();

View File

@ -1,2 +1,2 @@
brcc32 data.rc brcc32 data.rc
dcc32 hfs -U\code\mine\libs;\code\other\ics\delphi\vc32;\code\other\compiled;c:\code\other\jcl\source\windows\;c:\code\other\jcl\source\common\;C:\progs\Borland\BDS\4.0\lib dcc32.exe hfs.dpr -$W+ --no-config -M -Q -TX.exe -AForms=VCL.Forms;Generics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG -I"c:\program files (x86)\embarcadero\studio\20.0\Lib\Debug";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";C:\Users\rejetto\Documents\Embarcadero\Studio\20.0\Imports;"c:\program files (x86)\embarcadero\studio\20.0\Imports"; C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";Presbylutheran;C:\code\other\compiled; C:\code\other\fastmm4;uFreeLocalizer;C:\code\other\kdl;c:\code\other\ics8\source;c:\code\other\GifImage;c:\code\other\DelphiZLib; c:\code\other\regexp\Source;c:\code\other\jcl\source\windows;c:\code\other\jcl\source\include;c:\code\other\jcl\source\common -LEC:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl -LNC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NSData.Win;Datasnap.Win;Web.Win; Soap.Win;Xml.Win;Bde;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win; -O"c:\program files (x86)\embarcadero\studio\20.0\Lib\Debug";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";"c:\program files (x86)\embarcadero\studio\20.0\Imports"; C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";Presbylutheran;C:\code\other\compiled; C:\code\other\fastmm4;uFreeLocalizer;C:\code\other\kdl;c:\code\other\ics8\source;c:\code\other\GifImage;c:\code\other\DelphiZLib; c:\code\other\regexp\Source;c:\code\other\jcl\source\windows;c:\code\other\jcl\source\include;c:\code\other\jcl\source\common -R"c:\program files (x86)\embarcadero\studio\20.0\Lib\Debug";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";"c:\program files (x86)\embarcadero\studio\20.0\Imports"; C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";Presbylutheran;C:\code\other\compiled; C:\code\other\fastmm4;uFreeLocalizer;C:\code\other\kdl;c:\code\other\ics8\source;c:\code\other\GifImage;c:\code\other\DelphiZLib; c:\code\other\regexp\Source;c:\code\other\jcl\source\windows;c:\code\other\jcl\source\include;c:\code\other\jcl\source\common -U"c:\program files (x86)\embarcadero\studio\20.0\Lib\Debug";"c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release";"c:\program files (x86)\embarcadero\studio\20.0\Imports"; C:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp;"c:\program files (x86)\embarcadero\studio\20.0\include";Presbylutheran;C:\code\other\compiled; C:\code\other\fastmm4;uFreeLocalizer;C:\code\other\kdl;c:\code\other\ics8\source;c:\code\other\GifImage;c:\code\other\DelphiZLib; c:\code\other\regexp\Source;c:\code\other\jcl\source\windows;c:\code\other\jcl\source\include;c:\code\other\jcl\source\common -K00400000 --description:"HFS ~ HTTP File Server - www.rejetto.com/hfs" -GD -NBC:\Users\Public\Documents\Embarcadero\Studio\20.0\Dcp -NHC:\Users\Public\Documents\Embarcadero\Studio\20.0\hpp\Win32