fcl-web: calling a web module on a fphttp based application twice leads to exception
Original Reporter info from Mantis: PascalDragon @PascalDragon
-
Reporter name: Sven Barth
Original Reporter info from Mantis: PascalDragon @PascalDragon
- Reporter name: Sven Barth
Description:
When a web module is called twice on a fphttp based applications leads to the following exception:
Duplicate name: A component named "&LtPos;ModuleName>" already exists
Steps to reproduce:
Compile the example in $fpcdir/packages/fcl-web/examples/echo/fphttp and run the binary. Open the corresponding URL (e.g. localhost:8080/TEchoModule) in a browser and load it a second time.
Expected result: the same page is shown again
Actual result: an exception page is shown
Additional information:
A patch is attached which checks for an existing instance like the legacy routing code does before creating a new one.
Mantis conversion info:
- Mantis ID: 33012
- OS: Win32
- OS Build: NT 6.1 (7)
- Platform: i386
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 37952 (#b4375fd3)
- Target version: 3.2.0