Update domain name to kpe.io
[cl-modlisp.git] / utils.lisp
index d6ebf831788766697f2aa46881173593377c6cc6..bab76c36b97e199c4b35e941c7ad54da85c53949 100644 (file)
@@ -18,7 +18,7 @@
     (:xml "text/xml")
     (:text "text/plain")
     (otherwise fmt)))
     (:xml "text/xml")
     (:text "text/plain")
     (otherwise fmt)))
-    
+
 (defun format-string (fmt headers)
  `(("Content-Type" .
     ,(format->string fmt))
 (defun format-string (fmt headers)
  `(("Content-Type" .
     ,(format->string fmt))
@@ -42,7 +42,7 @@
         ,result))))
 
 (defmacro with-ml-page ((&key (format :html) (precompute t) headers)
         ,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)))
   (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 #\&)
   (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)))))))