[fpc-pascal] FastCGI on Windows IIS

Michael Van Canneyt michael at freepascal.org
Tue Apr 26 08:39:43 CEST 2016



On Mon, 25 Apr 2016, Marcos Douglas wrote:

> On Mon, Apr 25, 2016 at 3:57 AM, Michael Van Canneyt
> <michael at freepascal.org> wrote:

>>
>>
>> Yes, this is a normal response, it seems ?
>
> Well, I was thinking if an Action should have more priority to execute
> if I call it directly on URL — but I don't know if the 'Module
> request' was execute because of the bug on PATHINFO or because it has
> more priority.

because of the bug on PATHINFO.

You can control the behaviour with the 'PreferModuleName' property.
But that only works if there is a default module.

>
>> Even so, PATHINFO should not contain /fcgitest.exe/.
>> You can trust Microsoft to do things in an incompatible way :/
>
> Yeah... :\
> So do you will make a patch or doesn't have time in this week?
> Maybe I can try. Now I know there is a SERVER_SOFTWARE variable to
> test if is Windows IIS... but if you will fix just tell me, please.

Well, time is of course an issue, but more importantly, I do not have ISS 
to test with.

I think that PATHINFO needs to be corrected in  custcgi.pp:

Procedure TCGIRequest.InitFromEnvironment:

Something like 
If Pos('IIS', ServerName)>0 then
   // Cut binary name from PathInfo

It will then also be fixed for FastCGI as it reuses this routine.

>
> I'm still using FPC 2.6.5 version. But I guess this package still
> works in this version so, do you think can I replace the fcl-web from
> 2.6.5 to use 3.0.0 version, after the changes?

It should not be a problem.

Michael.


More information about the fpc-pascal mailing list