summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-07 14:46:57 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-07 14:46:57 +0200
commit62733f2641749f363d1d758f8d531b71b6d6edbf (patch)
treeaa2d83193010843a833c520691cc684afde01832
parent053f3ba708be24fc7f9be0d9e96c633e150a0715 (diff)
When processing If-Modified-Since headers, recognise HTTP dates.
Ignore-this: 38ca7adc0b2cec14bd8d0524cd1585ef darcs-hash:72d2028420de3803dbb31d9ddb8fe1dc78f130dd
-rw-r--r--utils.lisp3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils.lisp b/utils.lisp
index 90cfb8b..f874323 100644
--- a/utils.lisp
+++ b/utils.lisp
@@ -329,7 +329,8 @@ ELEMENT-TYPE as the stream's."
(defun revalidate-cache-or-die ()
#+clisp
(when *if-modified-since*
- (let ((time (cybertiggyr-time:parse-time *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")))
+ (time (cybertiggyr-time:parse-time *if-modified-since* date-recognizers)))
(when (and (integerp time) (>= *if-modified-since* (compute-journal-last-modified-date)))
(http-add-header "Status: 304 Not Modified")
(http-send-headers)