1
0
Fork 0

fix time comparisons

* tekuti/cache.scm (make-entry): Fix time comparisons.
This commit is contained in:
Andy Wingo 2010-12-06 13:06:50 +01:00
parent 8f2e3b741c
commit 68966d9e17

View file

@ -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