summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-07 15:16:05 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-07 15:16:05 +0200
commit6bdb116a0fbbbcd152b4f738cbdb52ef313dcf2e (patch)
treef29395497360f04daf058c99d3599131c691b339
parentc45f1586910c3a76c3c91d35c74f8e9bd0c634ff (diff)
Specify the correct content type even for 304 responses.
Ignore-this: 813bd2f6535f3f0ec7f8ec1ad8757bde darcs-hash:e83444f36f9f27dcca66631e95f221d6caa7950b
-rwxr-xr-xjournal.lisp6
-rw-r--r--utils.lisp4
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)