From: Kevin M. Rosenberg Date: Sun, 16 Nov 2003 15:49:47 +0000 (+0000) Subject: r8226: update to new dtd writing functions X-Git-Tag: debian-0.6-2~3 X-Git-Url: http://git.kpe.io/?p=cl-modlisp.git;a=commitdiff_plain;h=5e8a673f84b1bf72d7bbcb28c1565b1d22e19a30 r8226: update to new dtd writing functions --- diff --git a/utils.lisp b/utils.lisp index 2f3a213..d6ebf83 100644 --- a/utils.lisp +++ b/utils.lisp @@ -12,13 +12,16 @@ (in-package #:modlisp) +(defun format->string (fmt) + (case fmt + (:html "text/html") + (:xml "text/xml") + (:text "text/plain") + (otherwise fmt))) + (defun format-string (fmt headers) `(("Content-Type" . - ,(case fmt - (:html "text/html") - (:xml "text/xml") - (:text "text/plain") - (otherwise fmt))) + ,(format->string fmt)) . ,headers)) (defmacro write-response ((&key headers len (status "200 OK")) &body body)