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))
|
(let ((last-modified (response-last-modified response))
|
||||||
(since (request-if-modified-since request)))
|
(since (request-if-modified-since request)))
|
||||||
(if (and last-modified since)
|
(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))
|
#t))
|
||||||
(let ((etag (response-etag response))
|
(let ((etag (response-etag response))
|
||||||
(match (request-if-none-match request)))
|
(match (request-if-none-match request)))
|
||||||
|
@ -94,8 +95,8 @@
|
||||||
(and (or since match)
|
(and (or since match)
|
||||||
(or (not since)
|
(or (not since)
|
||||||
(and last-modified
|
(and last-modified
|
||||||
(<= (date->time-utc last-modified)
|
(time<=? (date->time-utc last-modified)
|
||||||
(date->time-utc since))))
|
(date->time-utc since))))
|
||||||
(or (not match)
|
(or (not match)
|
||||||
(and etag (list? match) (member etag match)))
|
(and etag (list? match) (member etag match)))
|
||||||
(cons (build-response
|
(cons (build-response
|
||||||
|
|
Loading…
Reference in a new issue