From 2bbecbc7e755a35a587075584c442440bece78f0 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Tue, 22 Mar 2011 17:53:09 +0100 Subject: Properly set the Content-Type header when giving a 304 Not Modified response. --- mulkcms.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mulkcms.lisp b/mulkcms.lisp index e032db4..989d5bf 100644 --- a/mulkcms.lisp +++ b/mulkcms.lisp @@ -135,6 +135,8 @@ (setf (hunchentoot:header-out :last-modified) (hunchentoot:rfc-1123-date (simple-date:timestamp-to-universal-time last-update))) + (when content-type + (setf (hunchentoot:content-type*) content-type)) (when-let (date-string (hunchentoot:header-in* :if-modified-since)) (when-let (if-modified-since (parse-http-date date-string)) (print last-update) @@ -168,8 +170,6 @@ charhashnum path :row))) - (when content-type - (setf (hunchentoot:content-type*) content-type)) (if (and cached-data (simple-date:time< last-update (second cached-data))) (first cached-data) (let ((generated-content (funcall thunk))) -- cgit v1.2.3