Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2018-03

What changed in fcl-web?

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luca Olivetti

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

Reply by email

Luca Olivetti
to Luca Olivetti

El 21/03/18 a les 16:32, Luca Olivetti ha escrit:

Show quoted text 5 lines
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

Reply by email