> 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 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.

The fallback-handler seems to be the way to use this.
-- 
Gottes Segen!
Andi


  | Mail: [EMAIL PROTECTED] 
  | Web: http://beza1e1.tuxen.de
  | Jabber: [EMAIL PROTECTED]


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to