summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-03-12 16:27:21 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-03-12 16:27:21 +0100
commit6501daf7d0906f97125613c82af911aeed734971 (patch)
tree8aa1ef60f830d703fe1b2b2ef6f731ceb487d2e8
parentabe307a673d881411ac1fa8bee07cc347143d263 (diff)
Return a 404 for unhandled URIs.
-rw-r--r--mulkcms-hunchentoot.lisp8
1 files changed, 6 insertions, 2 deletions
diff --git a/mulkcms-hunchentoot.lisp b/mulkcms-hunchentoot.lisp
index babcae3..0b5cb87 100644
--- a/mulkcms-hunchentoot.lisp
+++ b/mulkcms-hunchentoot.lisp
@@ -1,5 +1,6 @@
(in-package #:mulkcms-hunchentoot)
+#+(or)
(define-easy-handler handle-admin-request (action)
;; XXX
)
@@ -13,11 +14,12 @@
;; requested file...):
(starts-with-subseq (namestring (truename *static-files*))
(namestring (truename file)))
+ (not (directory-pathname-p file))
(lambda () (handle-static-file file)))))
(defun dispatch-mulkcms-request (request)
(let* ((relative-path (subseq (script-name request) 1)))
- (mulkcms:find-request-handler relative-path(get-parameters*))))
+ (mulkcms::find-request-handler relative-path (get-parameters*))))
(defun setup-handlers ()
(setq *dispatch-table*
@@ -25,7 +27,9 @@
'dispatch-mulkcms-request
'dispatch-static-file-request
*dispatch-table*))
- (setq *default-handler* 'handle-mulkcms-request))
+ (setq *default-handler*
+ (lambda ()
+ (setf (return-code*) +http-not-found+))))
(defun start-server ()
(setq hunchentoot:*hunchentoot-default-external-format*