spiffy-errors added by dieggsy on Wed Dec 10 04:01:48 2025

(import (prefix spiffy spiffy:))

(define (say-hello continue)
  (spiffy:send-response status: 'ok body: "hello")
  (continue))

(spiffy:root-path ".")
(spiffy:vhost-map `(("localhost" . ,say-hello)))

(spiffy:start-server #:port 8080)

;; [Tue Dec  9 21:58:52 2025] "GET http://localhost:8080/ HTTP/1.1" Error: (unparse-headers)
;; could not unparse "Server" header (#((("Spiffy" "6.4" "Running on CHICKEN 6.0.0")) ())): cannot write to socket - Connection reset by peer
;; 5
;;
;;         Call history:
;;
;;         spiffy.scm:351: intarweb#update-response
;;         spiffy.scm:350: ##sys#dynamic-wind
;;         spiffy.scm:350: current-response444445
;;         spiffy.scm:350: current-response444445
;;         spiffy.scm:350: current-response444445
;;         spiffy.scm:356: thunk
;;         spiffy.scm:267: current-response
;;         spiffy.scm:267: intarweb#write-response
;;         spiffy.scm:513: k653
;;         spiffy.scm:350: current-response444445
;;         spiffy.scm:350: current-response444445
;;         spiffy.scm:314: current-response358359
;;         spiffy.scm:314: current-response358359
;;         spiffy.scm:501: g656
;;         spiffy.scm:515: handle-exception
;;         spiffy.scm:516: chicken.port#with-output-to-string              <--
;;
;;
;; [Tue Dec  9 21:58:57 2025] "GET http://localhost:8080/ HTTP/1.1" Error: (unparse-headers)
;; could not unparse "Content-Length" header (#(350 ())): cannot write to socket - Connection reset by peer
;; 5
;;
;;         Call history:
;;
;;         spiffy.scm:351: intarweb#update-response
;;         spiffy.scm:350: ##sys#dynamic-wind
;;         spiffy.scm:350: current-response444445
;;         spiffy.scm:350: current-response444445
;;         spiffy.scm:350: current-response444445
;;         spiffy.scm:356: thunk
;;         spiffy.scm:267: current-response
;;         spiffy.scm:267: intarweb#write-response
;;         spiffy.scm:513: k653
;;         spiffy.scm:350: current-response444445
;;         spiffy.scm:350: current-response444445
;;         spiffy.scm:314: current-response358359
;;         spiffy.scm:314: current-response358359
;;         spiffy.scm:501: g656
;;         spiffy.scm:515: handle-exception
;;         spiffy.scm:516: chicken.port#with-output-to-string              <--