[fpc-pascal] fpweb: processing URLs like GET http://server/cgi-bin/tigercgi/documents/301/

Michael Van Canneyt michael at freepascal.org
Mon Feb 25 14:06:42 CET 2013



On Mon, 25 Feb 2013, Reinier Olislagers wrote:

> On 25-2-2013 13:38, Michael Van Canneyt wrote:
>> On Mon, 25 Feb 2013, Reinier Olislagers wrote:
>>> Say I have an fpweb CGI server with action documents registered and I
>>> GET http://server/cgi-bin/tigercgi/documents/301/
>>> 1. How do instruct the documents action to handle that? Currently I get
>>> a Error: Could not determine HTTP module for request ....
>>
>> Did you register the module ? It means that the documents module was not
>> found.
>>
>> As soon as the path has more than 1 component, it is assumed that the
>> path is composed of
>> /module/action/whatever.
>
> Yep, started a new default CGI application which registered a module.
> I'll have a look to see how it goes with multiple modules (e.g. for
> documents, images, whatever), and how I can handle arbitrary actions
> (document id such as 301 in the example above, image ID) or perhaps even
> disable action handling altogether if possible.

Do not define any actions, and implement the OnRequest handle of the module.
The OnRequest handle is executed before any Action is tested, and only if it 
didn't handle the request is the action handled.

Michael.



More information about the fpc-pascal mailing list