summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mulkcms-hunchentoot.lisp35
1 files changed, 18 insertions, 17 deletions
diff --git a/mulkcms-hunchentoot.lisp b/mulkcms-hunchentoot.lisp
index 5a134ac..4300871 100644
--- a/mulkcms-hunchentoot.lisp
+++ b/mulkcms-hunchentoot.lisp
@@ -36,23 +36,24 @@
(append (get-parameters*)
(post-parameters*))
(header-in* :accept-language))))
- (lambda ()
- (let ((result (funcall handler)))
- (typecase result
- (cons
- (when-let (content-type (getf result :content-type))
- (setf (hunchentoot:content-type*) content-type))
- (when-let (headers (getf result :headers))
- (dolist (header headers)
- (setf (hunchentoot:header-out (car header))
- (cdr header))))
- (when-let (return-code (getf result :return-code))
- (setf (hunchentoot:return-code*) return-code)
- ;;(hunchentoot:abort-request-handler)
- )
- (getf result :body))
- (t
- result))))))))
+ (and handler
+ (lambda ()
+ (let ((result (funcall handler)))
+ (typecase result
+ (cons
+ (when-let (content-type (getf result :content-type))
+ (setf (hunchentoot:content-type*) content-type))
+ (when-let (headers (getf result :headers))
+ (dolist (header headers)
+ (setf (hunchentoot:header-out (car header))
+ (cdr header))))
+ (when-let (return-code (getf result :return-code))
+ (setf (hunchentoot:return-code*) return-code)
+ ;;(hunchentoot:abort-request-handler)
+ )
+ (getf result :body))
+ (t
+ result)))))))))
(defun setup-handlers ()
(setq *dispatch-table*