fix time comparisons
* tekuti/cache.scm (make-entry): Fix time comparisons.
This commit is contained in:
parent
8f2e3b741c
commit
68966d9e17
1 changed files with 4 additions and 3 deletions
|
@ -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,7 +95,7 @@
|
|||
(and (or since match)
|
||||
(or (not since)
|
||||
(and last-modified
|
||||
(<= (date->time-utc last-modified)
|
||||
(time<=? (date->time-utc last-modified)
|
||||
(date->time-utc since))))
|
||||
(or (not match)
|
||||
(and etag (list? match) (member etag match)))
|
||||
|
|
Loading…
Reference in a new issue