Re: [Chicken-users] Spiffy Question: handle-not-found

2010-02-15 Thread Taylor Venable
On Sun, 2010-02-14 at 18:17 +0100, Peter Bex wrote: On Sun, Feb 14, 2010 at 11:39:18AM -0500, Taylor Venable wrote: The Spiffy documentation says about the value of handle-not-found: It is a procedure of one argument, the path (a string) that was requested. However, it seems that the actual

[Chicken-users] Spiffy Question: handle-not-found

2010-02-14 Thread Taylor Venable
Hi, I'm using Spiffy and setting handle-not-found in an attempt to use Spiffy like a generic URL-based dispatcher. For example, when the user requests /foo/bar I want to send back the result of calling function x, and when the user requests /asdf/jkl I want to send back the result of calling

Re: [Chicken-users] Spiffy Question: handle-not-found

2010-02-14 Thread Peter Bex
On Sun, Feb 14, 2010 at 11:39:18AM -0500, Taylor Venable wrote: The Spiffy documentation says about the value of handle-not-found: It is a procedure of one argument, the path (a string) that was requested. However, it seems that the actual argument is the path, up until the first component

Re: [Chicken-users] Spiffy Question: handle-not-found

2010-02-14 Thread Taylor Venable
I made a mistake when copying this example from the real source code; it should have read: (handle-not-found (lambda (path) (log-to (debug-log) REQUEST: ~s path) (cond ((string=? path /foo/bar); s/uri/path/ (x)) ((string=? path /asdf/jkl) ; s/uri/path/