summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-12-23 23:58:55 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-12-23 23:58:55 +0100
commit12cdc3f219e948326fc6b5f428aca02b4b15c655 (patch)
tree5545bc6db3b921e92f6f66c33e37768c98960b36
parent3b97d53de6b73b41d2153f74aa8c1961a75441ae (diff)
Fix static file handling.
-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*