mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 12:30:24 +02:00
* Patch from Fabio Girardi to support ifNoneChanged header using enumerated
git-svn-id: trunk@45421 -
This commit is contained in:
parent
2639e8af7e
commit
feb861e73a
@ -89,7 +89,7 @@ const
|
|||||||
FieldCookie = HeaderCookie deprecated;
|
FieldCookie = HeaderCookie deprecated;
|
||||||
FieldSetCookie = HeaderSetCookie deprecated;
|
FieldSetCookie = HeaderSetCookie deprecated;
|
||||||
|
|
||||||
NoHTTPFields = 27;
|
NoHTTPFields = 28;
|
||||||
|
|
||||||
HTTPDateFmt = httpProtocol.HTTPDateFmt;
|
HTTPDateFmt = httpProtocol.HTTPDateFmt;
|
||||||
SCookieExpire = httpProtocol.SCookieExpire;
|
SCookieExpire = httpProtocol.SCookieExpire;
|
||||||
@ -129,7 +129,7 @@ Const
|
|||||||
fieldFrom, fieldIfModifiedSince, fieldLastModified, fieldLocation,
|
fieldFrom, fieldIfModifiedSince, fieldLastModified, fieldLocation,
|
||||||
fieldPragma, fieldReferer, fieldRetryAfter, fieldServer,
|
fieldPragma, fieldReferer, fieldRetryAfter, fieldServer,
|
||||||
fieldSetCookie, fieldUserAgent, fieldWWWAuthenticate,
|
fieldSetCookie, fieldUserAgent, fieldWWWAuthenticate,
|
||||||
fieldHost, fieldCacheControl,fieldXRequestedWith) deprecated;
|
fieldHost, fieldCacheControl,fieldXRequestedWith,fieldIfNoneMatch) deprecated;
|
||||||
|
|
||||||
// Map header names on indexes in property getter/setter. 0 means not mapped !
|
// Map header names on indexes in property getter/setter. 0 means not mapped !
|
||||||
HTTPFieldIndexes : THTTPIndexes
|
HTTPFieldIndexes : THTTPIndexes
|
||||||
@ -140,7 +140,7 @@ Const
|
|||||||
14,15,16,17,
|
14,15,16,17,
|
||||||
18,19,20,21,
|
18,19,20,21,
|
||||||
22,23,24,
|
22,23,24,
|
||||||
34,0,36) deprecated;
|
34,0,36,26) deprecated;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -553,6 +553,8 @@ type
|
|||||||
Procedure RemoveVariable(VariableName : String); virtual; abstract;
|
Procedure RemoveVariable(VariableName : String); virtual; abstract;
|
||||||
// Terminate session
|
// Terminate session
|
||||||
Procedure Terminate; virtual; abstract;
|
Procedure Terminate; virtual; abstract;
|
||||||
|
// checks if session variable exists
|
||||||
|
Function SessionVariableExists(VarName : String) : Boolean; Virtual; abstract;
|
||||||
// Session timeout in minutes
|
// Session timeout in minutes
|
||||||
Property TimeOutMinutes : Integer Read FTimeOut Write FTimeOut default 15;
|
Property TimeOutMinutes : Integer Read FTimeOut Write FTimeOut default 15;
|
||||||
// ID of this session.
|
// ID of this session.
|
||||||
@ -595,6 +597,7 @@ type
|
|||||||
|
|
||||||
THandleCORSOption = (hcDetect, // Detect OPTIONS request, send full headers
|
THandleCORSOption = (hcDetect, // Detect OPTIONS request, send full headers
|
||||||
hcFull, // Force sending full headers
|
hcFull, // Force sending full headers
|
||||||
|
hcHumanReadable, // Human readable result
|
||||||
hcSend // In case of full headers, send response
|
hcSend // In case of full headers, send response
|
||||||
);
|
);
|
||||||
THandleCORSOptions = set of THandleCORSOption;
|
THandleCORSOptions = set of THandleCORSOption;
|
||||||
@ -1092,7 +1095,7 @@ Const
|
|||||||
6,7,8,
|
6,7,8,
|
||||||
9,-1,-1,-1,
|
9,-1,-1,-1,
|
||||||
10,12,-1,13,-1,
|
10,12,-1,13,-1,
|
||||||
14,34,-1,15,-1,
|
14,34,-1,15,26,
|
||||||
-1,-1,16,17,-1,
|
-1,-1,16,17,-1,
|
||||||
18,-1,-1,-1,19,
|
18,-1,-1,-1,19,
|
||||||
20,21,-1,-1,
|
20,21,-1,-1,
|
||||||
|
@ -46,6 +46,7 @@ Type
|
|||||||
Public
|
Public
|
||||||
Destructor Destroy; override;
|
Destructor Destroy; override;
|
||||||
Procedure Terminate; override;
|
Procedure Terminate; override;
|
||||||
|
function SessionVariableExists(VarName: String): Boolean; override;
|
||||||
Procedure UpdateResponse(AResponse : TResponse); override;
|
Procedure UpdateResponse(AResponse : TResponse); override;
|
||||||
Procedure InitSession(ARequest : TRequest; OnNewSession, OnExpired: TNotifyEvent); override;
|
Procedure InitSession(ARequest : TRequest; OnNewSession, OnExpired: TNotifyEvent); override;
|
||||||
Procedure InitResponse(AResponse : TResponse); override;
|
Procedure InitResponse(AResponse : TResponse); override;
|
||||||
@ -359,6 +360,12 @@ begin
|
|||||||
RemoveFromSessionState(ssExpired);
|
RemoveFromSessionState(ssExpired);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TIniWebSession.SessionVariableExists(VarName: String): Boolean;
|
||||||
|
begin
|
||||||
|
CheckSession;
|
||||||
|
Result:=FIniFile.ValueExists(SData,VarName);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TIniWebSession.UpdateResponse(AResponse: TResponse);
|
procedure TIniWebSession.UpdateResponse(AResponse: TResponse);
|
||||||
begin
|
begin
|
||||||
// Do nothing. Init has done the job.
|
// Do nothing. Init has done the job.
|
||||||
|
Loading…
Reference in New Issue
Block a user