[fpc-pascal] Re: Nginx, FastCGI and /module/action vs ?module=module&action=action
leledumbo
leledumbo_cool at yahoo.co.id
Mon Jul 23 14:56:48 CEST 2012
Seems like the old IncludeHTTPPathDelimiter bug strikes back (AFAIR it's been
closed when I said Marco's patch works), I need to change:
procedure RegisterFileLocation(const ALocation,ADirectory: String);
begin
...
if (ADirectory='') then
Locations.Values[IncludeTrailingPathDelimiter(ALocation)]:=ExtractFilePath(ParamStr(0))
else
Locations.Values[IncludeTrailingPathDelimiter(ALocation)]:=IncludeTrailingPathDelimiter(ADirectory);
...
end;
to
procedure RegisterFileLocation(const ALocation,ADirectory: String);
begin
...
if (ADirectory='') then
Locations.Values[IncludeHTTPPathDelimiter(ALocation)]:=ExtractFilePath(ParamStr(0))
else
Locations.Values[IncludeHTTPPathDelimiter(ALocation)]:=IncludeTrailingPathDelimiter(ADirectory);
...
end;
Furthermore, nginx supports multiple servers (so that we could have:
http://localhost/what/ever/it/is/www.realsite.com) which would cause problem
with MapFileName code because BaseURL property takes the first slash after
http:// up to the last slash (in case of:
http://localhost/what/ever/it/is/www.realsite.com/css/mycss.css, BaseURL =
/what/ever/it/is/www.realsite.com/css/). I'll report this.
--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Nginx-FastCGI-and-module-action-vs-module-module-action-action-tp5710411p5710426.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal
mailing list