Artifact 02c28bc9cbaa4ccd34c8230927eb2c59c62d4bb9:
- File testhttp/testserver.scm — part of check-in [f7d6060988] at 2013-01-17 12:05:56 on branch http-transport — http sucks version. well, my implementation using spiffy and http-client sucks. (user: mrwellan, size: 434) [annotate] [blame] [check-ins using] [more...]
(use spiffy uri-common intarweb spiffy-request-vars) (root-path "/var/www") (vhost-map `(((* any) . ,(lambda (continue) (let (($ (request-vars source: 'both))) (print ($ 'dat)) (if (equal? (uri-path (request-uri (current-request))) '(/ "hey")) (send-response body: "hey there!\n" headers: '((content-type text/plain))) (continue))))))) (start-server port: 12345)