summaryrefslogtreecommitdiff
path: root/journal.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-11 11:34:44 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-11 11:34:44 +0200
commit468ea3a95aa82824559da26f623b2f201983388b (patch)
tree7d336c6eecea3c0b450f4c7aadf7efaa2277faa5 /journal.lisp
parentd5dc28513708e867aa744f77315a11542c609abf (diff)
Introduce a *MODE* variable that distinguishes between static and dynamic mode.
Ignore-this: fada9480007419d11bed4ab86bb06c48 darcs-hash:dd4ba6d22a835ec8db31a88de184186429733563
Diffstat (limited to 'journal.lisp')
-rwxr-xr-xjournal.lisp30
1 files changed, 17 insertions, 13 deletions
diff --git a/journal.lisp b/journal.lisp
index b84e1a7..317f87a 100755
--- a/journal.lisp
+++ b/journal.lisp
@@ -55,9 +55,10 @@
(defun show-comment-feed ()
#.(locally-enable-sql-reader-syntax)
(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")
+ (when (eq *mode* :http)
+ (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"))
(flet ((atom-time (time)
(format-date nil
@@ -128,9 +129,10 @@
(defun show-atom-entry ()
#.(locally-enable-sql-reader-syntax)
(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")
+ (when (eq *mode* :http)
+ (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"))
(with-xml-output (*standard-output* :encoding "utf-8")
(show-atom-entry-xml (find-entry *post-number*) :full-content t :include-edit-links t)))
@@ -184,9 +186,10 @@
(defun show-atom-feed (&key include-edit-links full-content)
#.(locally-enable-sql-reader-syntax)
(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")
+ (when (eq *mode* :http)
+ (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"))
(flet ((atom-time (time)
(format-date nil
@@ -413,10 +416,11 @@
;; termination, which makes generating a Last-Modified header
;; feel slower to the end user rather than faster.
;;
- (http-add-header "Last-Modified" (http-timestamp (compute-journal-last-modified-date)))
- (http-add-header "Content-Language" "de")
- (http-add-header "Cache-Control" "public")
- (http-send-headers "text/html; charset=UTF-8")
+ (when (eq *mode* :http)
+ (http-add-header "Last-Modified" (http-timestamp (compute-journal-last-modified-date)))
+ (http-add-header "Content-Language" "de")
+ (http-add-header "Cache-Control" "public")
+ (http-send-headers "text/html; charset=UTF-8"))
(<xhtml :xmlns "http://www.w3.org/1999/xhtml"
:lang "de"