summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-07 14:53:17 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-07 14:53:17 +0200
commitc822c31fa68758dc46a02c5e82381456fab2b35d (patch)
tree5d3d61a06bd011d1202b73d6a69bd05d272b72c2
parentb501385ad1ac0a20b29f14ac146657653a5ddb06 (diff)
Don't crash when COMPUTE-JOURNAL-LAST-MODIFIED-DATE returns NIL.
Ignore-this: 755d8ebf6cc4e3c433bfa2c50c31a05d darcs-hash:0e0f276459bedc1939b872dd373403848c02cc01
-rw-r--r--utils.lisp7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils.lisp b/utils.lisp
index 89c3bf4..d2a819e 100644
--- a/utils.lisp
+++ b/utils.lisp
@@ -330,8 +330,11 @@ ELEMENT-TYPE as the stream's."
#+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")))
- (requested-time (cybertiggyr-time:parse-time *if-modified-since* date-recognisers)))
- (when (and (integerp requested-time) (>= requested-time (compute-journal-last-modified-date)))
+ (requested-time (cybertiggyr-time:parse-time *if-modified-since* date-recognisers))
+ (modified-time (compute-journal-last-modified-date)))
+ (when (and (integerp requested-time)
+ (integerp modified-time)
+ (>= requested-time modified-time))
(http-add-header "Status: 304 Not Modified")
(http-send-headers)
(ext:quit 0))))