diff options
author | Andy Wingo | 2010-12-06 13:06:50 +0100 |
---|---|---|
committer | Andy Wingo | 2010-12-06 13:06:50 +0100 |
commit | 68966d9e176bde885a083c81b8aef1887a0c3d9c (patch) | |
tree | edf500e21f97fdfd2f10ac87db965f8c4cbe782e | |
parent | 8f2e3b741c41dfc088645a89e0cade14d2835630 (diff) | |
download | tekuti-68966d9e176bde885a083c81b8aef1887a0c3d9c.tar.gz tekuti-68966d9e176bde885a083c81b8aef1887a0c3d9c.zip |
fix time comparisons
* tekuti/cache.scm (make-entry): Fix time comparisons.
-rw-r--r-- | tekuti/cache.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tekuti/cache.scm b/tekuti/cache.scm index 8674f9b..d487ee4 100644 --- a/tekuti/cache.scm +++ b/tekuti/cache.scm @@ -75,7 +75,8 @@ (let ((last-modified (response-last-modified response)) (since (request-if-modified-since request))) (if (and last-modified since) - (<= (date->time-utc last-modified) (date->time-utc since)) + (time<=? (date->time-utc last-modified) + (date->time-utc since)) #t)) (let ((etag (response-etag response)) (match (request-if-none-match request))) @@ -94,8 +95,8 @@ (and (or since match) (or (not since) (and last-modified - (<= (date->time-utc last-modified) - (date->time-utc since)))) + (time<=? (date->time-utc last-modified) + (date->time-utc since)))) (or (not match) (and etag (list? match) (member etag match))) (cons (build-response |