r8226: update to new dtd writing functions
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 16 Nov 2003 15:49:47 +0000 (15:49 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 16 Nov 2003 15:49:47 +0000 (15:49 +0000)
utils.lisp

index 2f3a2139186f2398291f568f01d12a34f3141731..d6ebf831788766697f2aa46881173593377c6cc6 100644 (file)
 
 (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)