chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Spiffy/SSP question


From: Hans Nowak
Subject: [Chicken-users] Spiffy/SSP question
Date: Tue, 26 Feb 2008 22:37:51 -0500
User-agent: Thunderbird 2.0.0.0 (Macintosh/20070326)

Howdy y'all,

I'm having a bit of trouble getting SSP to work. Most likely I am doing something wrong, I just don't know what exactly. :-)

I have a file web/blah.ssp with this code from the Spiffy documentation:

<html><body>
<ol><?scheme (for-each (lambda (i) (printf "<li>~S~%" i)) (iota 5))?></ol>
<br />
<b><?(call-with-values (lambda () (user-information (current-user-id))) (lambda (name . _) name))?><b>
</body></html>

Then I do the following in csi:

#;1> (use spiffy)
; loading /usr/local/lib/chicken/3/spiffy.scm ...
; loading /usr/local/lib/chicken/3/spiffy-base.so ...
; loading /usr/local/lib/chicken/3/http-server.so ...
; loading /usr/local/lib/chicken/3/http-utils.so ...
; loading /usr/local/lib/chicken/3/sendfile.so ...
#;3> (use ssp-handler)
; loading /usr/local/lib/chicken/3/ssp-handler.so ...
#;5> (spiffy-file-ext-handlers
--->   `(("ssp" . ,ssp-handler)))
#;6> (start-server)

Now, going to http://127.0.0.1:8080/blah.ssp results in the following error:

500 Internal server error
Sorry, your request could not be handled.
Error: (fprintf)
too few arguments to formatted output procedure

        Call history:

        <eval>            (printf "<li>~S~%" i)
        <eval>            (printf "<li>~S~%" i)
        <eval>            (display "</ol>\n<br />\n<b>")
<eval> (display (call-with-values (lambda () (user-information (current-user-id))) (lambda (name . _) name... <eval> (call-with-values (lambda () (user-information (current-user-id))) (lambda (name . _) name))
        <eval>            (user-information (current-user-id))
        <eval>            (current-user-id)
        <eval>            (display "<b>\n</body></html>")     <--

By contrast, if I create a plain HTML file web/index.html, it is served 
correctly.

What am I doing wrong?  (I am using Chicken 2.74 on OS X 10.4, if that matters.)

Thanks,

--Hans





reply via email to

[Prev in Thread] Current Thread [Next in Thread]