What changed in fcl-web?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

What changed in fcl-web?

Luca Olivetti-2
I have a standalone web application (fphttpapp) with a main module and a
couple of additional modules.
I developed it a while ago with fpc-2.6.4 and it works quite well.

If I compile it with fpc 3.0.4 it stops working:

1) the second time I load a page I get an error

Error: Duplicate name: A component named "MainModule" already exists

If I change the Kind of the web module from wkPooled to wkOneShot it
doesn't happen, but why do I have to change it and what other side
effects will it have?


2) all the requests are passed to the main module and not to the
additional ones, e.g. the request

  http://myserver:8085/files/test.html


with 2.6.4 would be dispatched to the module where I did a

   RegisterHTTPModule('files',TFiles)

with 3.0.4 it doesn't


Bye
--
Luca
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: What changed in fcl-web?

Luca Olivetti-2
El 21/03/18 a les 16:32, Luca Olivetti ha escrit:
> I have a standalone web application (fphttpapp) with a main module and a
> couple of additional modules.
> I developed it a while ago with fpc-2.6.4 and it works quite well.
>
> If I compile it with fpc 3.0.4 it stops working:

Never mind, meanwhile I found this (I remember reading it but I didn't
give it too much thought at the time)

http://lists.freepascal.org/pipermail/fpc-pascal/2017-January/049852.html

Application.LegacyRouting:=true

fixes it

Bye
--
Luca
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal