|
@@ -115,12 +115,14 @@ Type
|
|
FEmail : String;
|
|
FEmail : String;
|
|
FAdministrator : String;
|
|
FAdministrator : String;
|
|
FOutput : TStream;
|
|
FOutput : TStream;
|
|
|
|
+ FHandleGetOnPost : Boolean;
|
|
Procedure InitRequestVars;
|
|
Procedure InitRequestVars;
|
|
Function GetEmail : String;
|
|
Function GetEmail : String;
|
|
Function GetAdministrator : String;
|
|
Function GetAdministrator : String;
|
|
Function GetRequestVariable(Const VarName : String) : String;
|
|
Function GetRequestVariable(Const VarName : String) : String;
|
|
Function GetRequestVariableCount : Integer;
|
|
Function GetRequestVariableCount : Integer;
|
|
Public
|
|
Public
|
|
|
|
+ constructor Create(AOwner: TComponent); override;
|
|
Destructor Destroy; override;
|
|
Destructor Destroy; override;
|
|
Property Request : TCGIRequest read FRequest;
|
|
Property Request : TCGIRequest read FRequest;
|
|
Property Response: TCGIResponse Read FResponse;
|
|
Property Response: TCGIResponse Read FResponse;
|
|
@@ -139,6 +141,7 @@ Type
|
|
Function UploadedFileName(Const VarName : String) : String;
|
|
Function UploadedFileName(Const VarName : String) : String;
|
|
Property Email : String Read GetEmail Write FEmail;
|
|
Property Email : String Read GetEmail Write FEmail;
|
|
Property Administrator : String Read GetAdministrator Write FAdministrator;
|
|
Property Administrator : String Read GetAdministrator Write FAdministrator;
|
|
|
|
+ Property HandleGetOnPost : Boolean Read FHandleGetOnPost Write FHandleGetOnPost;
|
|
Property RequestVariables[VarName : String] : String Read GetRequestVariable;
|
|
Property RequestVariables[VarName : String] : String Read GetRequestVariable;
|
|
Property RequestVariableCount : Integer Read GetRequestVariableCount;
|
|
Property RequestVariableCount : Integer Read GetRequestVariableCount;
|
|
end;
|
|
end;
|
|
@@ -354,7 +357,11 @@ begin
|
|
Raise Exception.Create(SErrNoRequestMethod);
|
|
Raise Exception.Create(SErrNoRequestMethod);
|
|
FRequest.InitFromEnvironment;
|
|
FRequest.InitFromEnvironment;
|
|
if CompareText(R,'POST')=0 then
|
|
if CompareText(R,'POST')=0 then
|
|
- Request.InitPostVars
|
|
|
|
|
|
+ begin
|
|
|
|
+ Request.InitPostVars;
|
|
|
|
+ if FHandleGetOnPost then
|
|
|
|
+ Request.InitGetVars;
|
|
|
|
+ end
|
|
else if CompareText(R,'GET')=0 then
|
|
else if CompareText(R,'GET')=0 then
|
|
Request.InitGetVars
|
|
Request.InitGetVars
|
|
else
|
|
else
|
|
@@ -470,6 +477,12 @@ begin
|
|
Result:=0;
|
|
Result:=0;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+constructor TCustomCGIApplication.Create(AOwner: TComponent);
|
|
|
|
+begin
|
|
|
|
+ inherited Create(AOwner);
|
|
|
|
+ FHandleGetOnPost := True;
|
|
|
|
+end;
|
|
|
|
+
|
|
Procedure TCustomCGIApplication.AddResponse(Const S : String);
|
|
Procedure TCustomCGIApplication.AddResponse(Const S : String);
|
|
|
|
|
|
Var
|
|
Var
|