Hello Andreas, On Tue, 17 Oct 2006 08:58:00 +0200 Andreas Zwinkau <[EMAIL PROTECTED]> wrote:
> > In the file attached to the message pointed by the link above, you can > > find the code to map a part of an URL to a Scheme procedure name. To > > achieve that, the http-server's `http:find-resource' procedure needs > > to be modified to match regexes. As far as I understand, it's similar > > to what you suggest as `http:add-dynamic-resource'. > Yes, it's similar, but not exactly the same thing. How does your > interface react on too much or few variables? I'm not sure I understand. What do you mean "variables" in this context? > I wrote some dispatch code, which passes this test (using check egg): > > (letrec ((something 'blub) > (dispatch (dispatch-rules > (("/" "/index") ((GET something) (POST 'error))) > ("/:pagename" ((GET 'show-page)))))) > (check (dispatch "/" 'GET) => something) > (check (dispatch "/index" 'POST) => 'error) > (check (dispatch "/hi" 'GET) => 'show-page)) > > This is only the lookup. "something" could be a function and called > with the request object and the "pagename" variable. This interface is > more strict than Marios. As far as I understand, you say it is more strict because you specify whether procedures should handle GET or POST requests. Is it right? Best wishes, Mario _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users