summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2009-10-07 14:30:28 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2009-10-07 14:30:28 +0200
commit053f3ba708be24fc7f9be0d9e96c633e150a0715 (patch)
treeb4c1a0f7c1a105f4ea2571084b8c9f8e526a3322
parent54237f308a3fc40d2297f5e8d24c17f4aeeed0ef (diff)
Do not crash when processing a request without an If-Modified-Since header.
darcs-hash:4a5478c5c626f7574f54a8bc0a252769306c8718
-rw-r--r--utils.lisp11
1 files changed, 6 insertions, 5 deletions
diff --git a/utils.lisp b/utils.lisp
index 590d310..90cfb8b 100644
--- a/utils.lisp
+++ b/utils.lisp
@@ -328,10 +328,11 @@ ELEMENT-TYPE as the stream's."
(defun revalidate-cache-or-die ()
#+clisp
- (let ((time (cybertiggyr-time:parse-time *if-modified-since*)))
- (when (and (integerp time) (>= *if-modified-since* (compute-journal-last-modified-date)))
- (http-add-header "Status: 304 Not Modified")
- (http-send-headers)
- (ext:quit 0)))
+ (when *if-modified-since*
+ (let ((time (cybertiggyr-time:parse-time *if-modified-since*)))
+ (when (and (integerp time) (>= *if-modified-since* (compute-journal-last-modified-date)))
+ (http-add-header "Status: 304 Not Modified")
+ (http-send-headers)
+ (ext:quit 0))))
#-clisp
nil)