[Top][All Lists]

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

[Chicken-users] Assistance with http egg

From: Jim Miller
Subject: [Chicken-users] Assistance with http egg
Date: Sun, 16 Apr 2006 01:49:39 -0400

I'm fairly new to scheme having been convinced by reading SICP that its worth a shot.  So far I'm trying to convert some code over to using chicken
scheme and I'm very happy so far.

My question involves the http-server egg. I tried running the example that is given in the documentation and all I get when I run it is a
404 error when I try to access the server. Can anyone tell me if this is still a correct example? The code is below (copied directly out of the
html page.

(require-extension http-server)

(http:add-resource '("/" "/index.html")
(lambda (r a)
(let ([msg "<h1>Hello, world!</h1>"])
(print "Content-type: text/html\r\nContent-length: " (add1 (string-length msg)) "\r\n\r\n" msg) ) ) )

((http:make-server 4242) #t)

reply via email to

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