From 6bdb116a0fbbbcd152b4f738cbdb52ef313dcf2e Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Wed, 7 Oct 2009 15:16:05 +0200 Subject: Specify the correct content type even for 304 responses. Ignore-this: 813bd2f6535f3f0ec7f8ec1ad8757bde darcs-hash:e83444f36f9f27dcca66631e95f221d6caa7950b --- journal.lisp | 6 +++--- utils.lisp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/journal.lisp b/journal.lisp index e9f55c8..df55e92 100755 --- a/journal.lisp +++ b/journal.lisp @@ -51,7 +51,7 @@ (defun show-comment-feed () #.(locally-enable-sql-reader-syntax) - (revalidate-cache-or-die) + (revalidate-cache-or-die "application/atom+xml; charset=UTF-8") (http-add-header "Last-Modified" (http-timestamp (compute-journal-last-modified-date))) (http-add-header "Content-Language" "de") (http-send-headers "application/atom+xml; charset=UTF-8") @@ -123,7 +123,7 @@ (defun show-atom-feed () #.(locally-enable-sql-reader-syntax) - (revalidate-cache-or-die) + (revalidate-cache-or-die "application/atom+xml; charset=UTF-8") (http-add-header "Last-Modified" (http-timestamp (compute-journal-last-modified-date))) (http-add-header "Content-Language" "de") (http-send-headers "application/atom+xml; charset=UTF-8") @@ -412,7 +412,7 @@ (defun show-web-journal () #.(locally-enable-sql-reader-syntax) - (revalidate-cache-or-die) + (revalidate-cache-or-die "text/html; charset=UTF-8") (with-web-journal ((if (member *action* '(:view :edit :preview :post-comment :save-entry)) (title-of (find-entry *post-number*)) diff --git a/utils.lisp b/utils.lisp index be7af1e..e111231 100644 --- a/utils.lisp +++ b/utils.lisp @@ -326,7 +326,7 @@ ELEMENT-TYPE as the stream's." (spamp comment) (body-of comment)))) -(defun revalidate-cache-or-die () +(defun revalidate-cache-or-die (content-type) #+clisp (when *if-modified-since* (let* ((date-recognisers (mapcar #'cybertiggyr-time::make-fmt-recognizer '("%A, %d-%B-%y %H:%M:%S GMT" "%A, %d %B %Y %H:%M:%S GMT" "%A %B %d %H:%M:%S %Y"))) @@ -336,7 +336,7 @@ ELEMENT-TYPE as the stream's." (integerp modified-time) (>= requested-time modified-time)) (http-add-header "Status" "304 Not Modified") - (http-send-headers) + (http-send-headers content-type) (ext:quit 0)))) #-clisp nil) -- cgit v1.2.3