mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 00:50:33 +02:00
* reverted ProcessedPathInfo to ReturnedPathInfo
git-svn-id: trunk@15352 -
This commit is contained in:
parent
96055e24ea
commit
2cd9eb927b
@ -368,7 +368,7 @@ Var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
S:=IncludeHTTPPathDelimiter(GetApplicationURL(ARequest));
|
S:=IncludeHTTPPathDelimiter(GetApplicationURL(ARequest));
|
||||||
P:=IncludeHTTPPathDelimiter(ARequest.ProcessedPathinfo);
|
P:=IncludeHTTPPathDelimiter(ARequest.ReturnedPathInfo);
|
||||||
If (P='') or (P='/') then
|
If (P='') or (P='/') then
|
||||||
P:=IncludeHTTPPathDelimiter(AModuleName);
|
P:=IncludeHTTPPathDelimiter(AModuleName);
|
||||||
if (Length(P)>0) and (P[1]='/') then
|
if (Length(P)>0) and (P[1]='/') then
|
||||||
|
@ -502,7 +502,7 @@ Constructor TApacheRequest.CreateReq(App : TCustomApacheApplication; ARequest :
|
|||||||
begin
|
begin
|
||||||
FApache:=App;
|
FApache:=App;
|
||||||
FRequest:=Arequest;
|
FRequest:=Arequest;
|
||||||
ProcessedPathInfo:=App.BaseLocation;
|
ReturnedPathInfo:=App.BaseLocation;
|
||||||
Inherited Create;
|
Inherited Create;
|
||||||
InitFromRequest;
|
InitFromRequest;
|
||||||
end;
|
end;
|
||||||
|
@ -267,7 +267,7 @@ type
|
|||||||
FHandleGetOnPost: Boolean;
|
FHandleGetOnPost: Boolean;
|
||||||
FURI: String;
|
FURI: String;
|
||||||
FFiles : TUploadedFiles;
|
FFiles : TUploadedFiles;
|
||||||
FProcessedPathInfo : String;
|
FReturnedPathInfo : String;
|
||||||
procedure ParseFirstHeaderLine(const line: String);override;
|
procedure ParseFirstHeaderLine(const line: String);override;
|
||||||
function GetFirstHeaderLine: String;
|
function GetFirstHeaderLine: String;
|
||||||
Protected
|
Protected
|
||||||
@ -286,7 +286,7 @@ type
|
|||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
Function GetNextPathInfo : String;
|
Function GetNextPathInfo : String;
|
||||||
Property ProcessedPathInfo : String Read FProcessedPathInfo Write FProcessedPathInfo;
|
Property ReturnedPathInfo : String Read FReturnedPathInfo Write FReturnedPathInfo;
|
||||||
Property CommandLine : String Read FCommandLine;
|
Property CommandLine : String Read FCommandLine;
|
||||||
Property Command : String read FCommand;
|
Property Command : String read FCommand;
|
||||||
Property URI : String read FURI; // Uniform Resource Identifier
|
Property URI : String read FURI; // Uniform Resource Identifier
|
||||||
@ -934,19 +934,19 @@ Var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
P:=PathInfo;
|
P:=PathInfo;
|
||||||
{$ifdef CGIDEBUG}SendDebug(Format('Pathinfo: "%s" "%s"',[P,FProcessedPathInfo]));{$ENDIF}
|
{$ifdef CGIDEBUG}SendDebug(Format('Pathinfo: "%s" "%s"',[P,FReturnedPathInfo]));{$ENDIF}
|
||||||
if (P <> '') and (P[length(P)] = '/') then
|
if (P <> '') and (P[length(P)] = '/') then
|
||||||
Delete(P, length(P), 1);//last char is '/'
|
Delete(P, length(P), 1);//last char is '/'
|
||||||
If (P<>'') and (P[1]='/') then
|
If (P<>'') and (P[1]='/') then
|
||||||
Delete(P,1,1);
|
Delete(P,1,1);
|
||||||
Delete(P,1,Length(IncludeHTTPPathDelimiter(FProcessedPathInfo)));
|
Delete(P,1,Length(IncludeHTTPPathDelimiter(FReturnedPathInfo)));
|
||||||
{$ifdef CGIDEBUG}SendDebug(Format('Pathinfo: "%s" "%s"',[P,FProcessedPathInfo]));{$ENDIF}
|
{$ifdef CGIDEBUG}SendDebug(Format('Pathinfo: "%s" "%s"',[P,FReturnedPathInfo]));{$ENDIF}
|
||||||
I:=Pos('/',P);
|
I:=Pos('/',P);
|
||||||
If (I=0) then
|
If (I=0) then
|
||||||
I:=Length(P)+1;
|
I:=Length(P)+1;
|
||||||
Result:=Copy(P,1,I-1);
|
Result:=Copy(P,1,I-1);
|
||||||
FProcessedPathInfo:=IncludeHTTPPathDelimiter(FProcessedPathInfo)+Result;
|
FReturnedPathInfo:=IncludeHTTPPathDelimiter(FReturnedPathInfo)+Result;
|
||||||
{$ifdef CGIDEBUG}SendDebug(Format('Pathinfo: "%s" "%s" : %s',[P,FProcessedPathInfo,Result]));{$ENDIF}
|
{$ifdef CGIDEBUG}SendDebug(Format('Pathinfo: "%s" "%s" : %s',[P,FReturnedPathInfo,Result]));{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRequest.ParseFirstHeaderLine(const line: String);
|
procedure TRequest.ParseFirstHeaderLine(const line: String);
|
||||||
|
Loading…
Reference in New Issue
Block a user