[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] dynamic web resources?
From: |
Mario Domenech Goulart |
Subject: |
Re: [Chicken-users] dynamic web resources? |
Date: |
17 Oct 2006 09:22:22 -0300 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Hello Andreas,
On Tue, 17 Oct 2006 08:58:00 +0200 Andreas Zwinkau <address@hidden> 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