From 053f3ba708be24fc7f9be0d9e96c633e150a0715 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Wed, 7 Oct 2009 14:30:28 +0200 Subject: Do not crash when processing a request without an If-Modified-Since header. darcs-hash:4a5478c5c626f7574f54a8bc0a252769306c8718 --- utils.lisp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'utils.lisp') 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) -- cgit v1.2.3