mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 03:46:10 +02:00
* Reverted accidentally committed files in r15616
git-svn-id: trunk@15617 -
This commit is contained in:
parent
790503cfc2
commit
734dc9e9df
@ -156,22 +156,7 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
Procedure TCustomCGIApplication.ShowException(E: Exception);
|
Procedure TCustomCGIApplication.ShowException(E: Exception);
|
||||||
var
|
|
||||||
LogStr: string;
|
|
||||||
FrameNumber: Integer;
|
|
||||||
Frames: PPointer;
|
|
||||||
FrameCount: integer;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
logstr := 'Exception occured: ' + e.Message;
|
|
||||||
|
|
||||||
LogStr := LogStr + LineEnding + BackTraceStrFunc(ExceptAddr);
|
|
||||||
FrameCount:=ExceptFrameCount;
|
|
||||||
Frames:=ExceptFrames;
|
|
||||||
for FrameNumber := 0 to FrameCount-1 do
|
|
||||||
LogStr := LogStr + LineEnding + BackTraceStrFunc(Frames[FrameNumber]);
|
|
||||||
Log(etError,LogStr);
|
|
||||||
|
|
||||||
if assigned(FResponse) then
|
if assigned(FResponse) then
|
||||||
ShowRequestException(FResponse,E)
|
ShowRequestException(FResponse,E)
|
||||||
else
|
else
|
||||||
|
@ -1205,10 +1205,7 @@ end;
|
|||||||
|
|
||||||
function TWebController.GetCurrentJavaScriptStack: TJavaScriptStack;
|
function TWebController.GetCurrentJavaScriptStack: TJavaScriptStack;
|
||||||
begin
|
begin
|
||||||
if FScriptStack.Count=0 then
|
result := TJavaScriptStack(FScriptStack.Items[FScriptStack.Count-1]);
|
||||||
result := nil
|
|
||||||
else
|
|
||||||
result := TJavaScriptStack(FScriptStack.Items[FScriptStack.Count-1]);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TWebController.InitializeAjaxRequest;
|
procedure TWebController.InitializeAjaxRequest;
|
||||||
|
@ -397,14 +397,15 @@ end;
|
|||||||
function TCustomWebActions.GetActionName(ARequest: TRequest): String;
|
function TCustomWebActions.GetActionName(ARequest: TRequest): String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
If (FActionVar<>'') then
|
|
||||||
Result:=ARequest.QueryFields.Values[FActionVar]
|
|
||||||
else
|
|
||||||
Result := '';
|
|
||||||
If Assigned(FOnGetAction) then
|
If Assigned(FOnGetAction) then
|
||||||
FOnGetAction(Self,ARequest,Result);
|
FOnGetAction(Self,ARequest,Result);
|
||||||
If (Result='') then
|
If (Result='') then
|
||||||
Result:=ARequest.GetNextPathInfo;
|
begin
|
||||||
|
If (FActionVar<>'') then
|
||||||
|
Result:=ARequest.QueryFields.Values[FActionVar];
|
||||||
|
If (Result='') then
|
||||||
|
Result:=ARequest.GetNextPathInfo;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TCustomWebActions.Create(AItemClass: TCollectionItemClass);
|
constructor TCustomWebActions.Create(AItemClass: TCollectionItemClass);
|
||||||
|
@ -116,7 +116,7 @@ Type
|
|||||||
Protected
|
Protected
|
||||||
Procedure DoBeforeRequest(ARequest : TRequest); virtual;
|
Procedure DoBeforeRequest(ARequest : TRequest); virtual;
|
||||||
Procedure DoAfterResponse(AResponse : TResponse); virtual;
|
Procedure DoAfterResponse(AResponse : TResponse); virtual;
|
||||||
Procedure GetParam(Const ParamName : String; Out Value : String); // Called by template
|
Procedure GetParam(Const ParamName : String; Out Value : String); virtual; // Called by template
|
||||||
Procedure GetTemplateContent(ARequest : TRequest; AResponse : TResponse); virtual;
|
Procedure GetTemplateContent(ARequest : TRequest; AResponse : TResponse); virtual;
|
||||||
function GetContent: String;virtual;
|
function GetContent: String;virtual;
|
||||||
Public
|
Public
|
||||||
@ -296,7 +296,7 @@ Type
|
|||||||
FRequest : TRequest;
|
FRequest : TRequest;
|
||||||
Public
|
Public
|
||||||
Constructor Create(AOwner :TCustomFPWebModule);
|
Constructor Create(AOwner :TCustomFPWebModule);
|
||||||
Function GetParam(const Key: String; out AValue: String) : boolean; override;
|
Procedure GetParam(Sender : TObject; Const ParamName : String; Out AValue : String);override;
|
||||||
Property Owner : TCustomFPWebModule Read FOwner;
|
Property Owner : TCustomFPWebModule Read FOwner;
|
||||||
Property Request : TRequest Read FRequest Write FRequest;
|
Property Request : TRequest Read FRequest Write FRequest;
|
||||||
end;
|
end;
|
||||||
@ -307,11 +307,10 @@ begin
|
|||||||
FOwner:=AOwner;
|
FOwner:=AOwner;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFPWebTemplate.GetParam(const Key: String; out AValue: String) : boolean;
|
procedure TFPWebTemplate.GetParam(Sender: TObject; const ParamName: String;
|
||||||
|
out AValue: String);
|
||||||
begin
|
begin
|
||||||
result := Inherited GetParam(Key, AValue);
|
FOwner.GetParam(ParamName, AValue);
|
||||||
if not result then
|
|
||||||
FOwner.GetParam(Key, AValue);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFPWebModule }
|
{ TFPWebModule }
|
||||||
|
@ -1141,7 +1141,7 @@ begin
|
|||||||
if FHandleGetOnPost then
|
if FHandleGetOnPost then
|
||||||
InitGetVars;
|
InitGetVars;
|
||||||
end
|
end
|
||||||
else if (CompareText(R,'GET')=0) or (CompareText(R,'HEAD')=0) then
|
else if CompareText(R,'GET')=0 then
|
||||||
InitGetVars
|
InitGetVars
|
||||||
else
|
else
|
||||||
Raise Exception.CreateFmt(SErrInvalidRequestMethod,[R]);
|
Raise Exception.CreateFmt(SErrInvalidRequestMethod,[R]);
|
||||||
|
@ -63,6 +63,7 @@ type
|
|||||||
procedure DoHandleAjaxRequest(ARequest: TRequest; AnAjaxResponse: TAjaxResponse; var Handled: boolean); virtual;
|
procedure DoHandleAjaxRequest(ARequest: TRequest; AnAjaxResponse: TAjaxResponse; var Handled: boolean); virtual;
|
||||||
procedure DoBeforeRequest(ARequest: TRequest); virtual;
|
procedure DoBeforeRequest(ARequest: TRequest); virtual;
|
||||||
procedure DoBeforeShowPage(ARequest: TRequest); virtual;
|
procedure DoBeforeShowPage(ARequest: TRequest); virtual;
|
||||||
|
function IsAjaxCall: boolean; virtual;
|
||||||
property WebModule: TFPWebModule read FWebModule;
|
property WebModule: TFPWebModule read FWebModule;
|
||||||
procedure DoCleanupAfterRequest(const AContentProducer: THTMLContentProducer);
|
procedure DoCleanupAfterRequest(const AContentProducer: THTMLContentProducer);
|
||||||
procedure SetRequest(ARequest: TRequest); virtual;
|
procedure SetRequest(ARequest: TRequest); virtual;
|
||||||
@ -77,7 +78,6 @@ type
|
|||||||
function ExchangeContentProducers(Child1, Child2: THTMLContentProducer) : boolean;
|
function ExchangeContentProducers(Child1, Child2: THTMLContentProducer) : boolean;
|
||||||
function MoveContentProducer(MoveElement, MoveBeforeElement: THTMLContentProducer) : boolean;
|
function MoveContentProducer(MoveElement, MoveBeforeElement: THTMLContentProducer) : boolean;
|
||||||
procedure ForeachContentProducer(AForeachChildsProc: TForeachContentProducerProc; Recursive: boolean);
|
procedure ForeachContentProducer(AForeachChildsProc: TForeachContentProducerProc; Recursive: boolean);
|
||||||
function IsAjaxCall: boolean; virtual;
|
|
||||||
|
|
||||||
procedure HandlePage(ARequest: TRequest; AResponse: TResponse; AWriter: THTMLwriter; AWebModule: TFPWebModule = nil); virtual;
|
procedure HandlePage(ARequest: TRequest; AResponse: TResponse; AWriter: THTMLwriter; AWebModule: TFPWebModule = nil); virtual;
|
||||||
procedure DoBeforeGenerateXML; virtual;
|
procedure DoBeforeGenerateXML; virtual;
|
||||||
|
@ -136,7 +136,6 @@ begin
|
|||||||
{$ifdef cgidebug}Senddebug('Creating iniwebsession');{$endif}
|
{$ifdef cgidebug}Senddebug('Creating iniwebsession');{$endif}
|
||||||
W:=TFPWebSession.Create(Nil);
|
W:=TFPWebSession.Create(Nil);
|
||||||
W.SessionDir:=GlobalSessionDir;
|
W.SessionDir:=GlobalSessionDir;
|
||||||
W.Cached:=true;
|
|
||||||
Result:=W;
|
Result:=W;
|
||||||
end;
|
end;
|
||||||
{$ifdef cgidebug}SendMethodExit('GetDefaultSession');{$endif}
|
{$ifdef cgidebug}SendMethodExit('GetDefaultSession');{$endif}
|
||||||
|
Loading…
Reference in New Issue
Block a user