[fpc-pascal] fpWeb: Error when trying to call a module without an action

Sven Barth pascaldragon at googlemail.com
Fri Mar 9 15:19:02 CET 2012


Am 09.03.2012 15:09, schrieb michael.vancanneyt at wisa.be:
>
>
> On Fri, 9 Mar 2012, Sven Barth wrote:
>
>> Hello together!
>>
>> As I already said on fpc-devel I'm currently playing around with
>> fcl-web and hit the next problem: I successfully managed to build and
>> run my first module, but when I added a second one I got an error when
>> I use the following URL to call my module (of which one is registered
>> as "treenode"):
>>
>> http://localhost:4321/treenode
>>
>> The given error is:
>>
>> Could not determine HTTP module for request ""
>>
>> It works correctly if I supply the name of the default action "list"
>> (or any other registered action). E.g. the following returns the
>> desired content:
>>
>> http://localhost:4321/treenode/list
>>
>> I'm using the embedded webserver variant and the error only surfaced
>> after I added a second module which let's me assume that the problem
>> is the same as this:
>> http://lists.lazarus.freepascal.org/pipermail/lazarus/2011-June/063655.html
>>
>
> And what exactly is the problem ?
>
> You can set the default module name in the TFPWebApplication. But in
> that case, the path is interpreted as the action to execute, so the
> correct URL would be
>
> http://localhost:4321/list
>
> to have the module first requires an additional property and patch.
> This is planned.

So it is still planned. Good to know. For now I'll just rely on the full 
path (thus including the name of the default action).

Regards,
Sven




More information about the fpc-pascal mailing list