projects
/
cl-modlisp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bba0c14
)
r8226: update to new dtd writing functions
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Sun, 16 Nov 2003 15:49:47 +0000
(15:49 +0000)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Sun, 16 Nov 2003 15:49:47 +0000
(15:49 +0000)
utils.lisp
patch
|
blob
|
history
diff --git
a/utils.lisp
b/utils.lisp
index 2f3a2139186f2398291f568f01d12a34f3141731..d6ebf831788766697f2aa46881173593377c6cc6 100644
(file)
--- 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)