(:xml "text/xml")
(:text "text/plain")
(otherwise fmt)))
-
+
(defun format-string (fmt headers)
`(("Content-Type" .
,(format->string fmt))
,result))))
(defmacro with-ml-page ((&key (format :html) (precompute t) headers)
- &body body)
+ &body body)
(if precompute
`(output-ml-page ,format (with-output-to-string (*modlisp-socket*) ,@body) :headers ,headers)
`(write-response (:headers (format-string ,format ,headers)) ,@body)))
(when posted-string
(let ((alist '()))
(dolist (name=val (kmrcl:delimited-string-to-list posted-string #\&)
- (nreverse alist))
- (let ((name-val-list (kmrcl:delimited-string-to-list name=val #\=)))
- (if (= 2 (length name-val-list))
- (destructuring-bind (name val) name-val-list
- (push (cons (if keyword
- (kmrcl:ensure-keyword name)
- name)
- (kmrcl:decode-uri-query-string val))
- alist))
- (cmsg-c :debug "Invalid number of #\= in ~S" name-val-list)))))))
+ (nreverse alist))
+ (let ((name-val-list (kmrcl:delimited-string-to-list name=val #\=)))
+ (if (= 2 (length name-val-list))
+ (destructuring-bind (name val) name-val-list
+ (push (cons (if keyword
+ (kmrcl:ensure-keyword name)
+ name)
+ (kmrcl:decode-uri-query-string val))
+ alist))
+ (cmsg-c :debug "Invalid number of #\= in ~S" name-val-list)))))))