summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-03-22 17:53:09 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-03-22 17:53:09 +0100
commit2bbecbc7e755a35a587075584c442440bece78f0 (patch)
tree76eb8aaab7099d8fd88eeec313dd1de0d7fd8508
parent6e0a4a6753e1835e6639ad024425b79a7ce28856 (diff)
Properly set the Content-Type header when giving a 304 Not Modified response.
-rw-r--r--mulkcms.lisp4
1 files 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)))